Allow models extending BaseModel to have an id equal to 0

pull/9494/head
Hypolite Petovan 2020-11-05 10:03:40 -05:00
rodzic c9c3d022bd
commit bb99b0bebe
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -141,7 +141,7 @@ abstract class BaseModel extends BaseEntity
protected function checkValid()
{
if (empty($this->data['id'])) {
if (!isset($this->data['id']) || is_null($this->data['id'])) {
throw new HTTPException\InternalServerErrorException(static::class . ' record uninitialized');
}
}