Fix for when created and created_manual is null

This commit is contained in:
Deon George 2020-01-05 18:15:25 +11:00
parent 270f63144b
commit 2e222b814b

View File

@ -286,9 +286,9 @@ abstract class Catalog extends Model
return (! is_readable($this->file_path())) ? NULL : filesize($this->file_path());
}
public function getCreatedAttribute(): Carbon
public function getCreatedAttribute()
{
return $this->created_manual ?: $this->asDateTime($this->attributes['created']);
return $this->created_manual ?: ($this->attributes['created'] ? $this->asDateTime($this->attributes['created']) : NULL);
}
/**