Fixed document item search 500 issue for missing Category with item..
This commit is contained in:
parent
4950dca137
commit
f4d88a350a
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue