Fixed document item search 500 issue for missing Category with item..

This commit is contained in:
Cüneyt Şentürk 2024-08-27 15:13:56 +01:00
parent 4950dca137
commit f4d88a350a
1 changed files with 3 additions and 1 deletions

View File

@ -253,7 +253,9 @@ class Category extends Model
*/
public function getColorHexCodeAttribute(): string
{
return $this->getHexCodeOfTailwindClass($this->color);
$color = $this->color ?? 'green-500';
return $this->getHexCodeOfTailwindClass($color);
}
/**