diff --git a/app/Models/Setting/Category.php b/app/Models/Setting/Category.php index 0c6b0fecd..239965176 100644 --- a/app/Models/Setting/Category.php +++ b/app/Models/Setting/Category.php @@ -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); } /**