fix: attempt to fix entry name when no theme (#781)

This commit is contained in:
Kyrch
2025-02-08 15:13:11 -03:00
committed by GitHub
parent fdceea037c
commit ad79ed1117
@@ -170,9 +170,13 @@ class AnimeThemeEntry extends BaseModel implements InteractsWithSchema
AnimeThemeEntry::RELATION_THEME_GROUP,
]);
$theme = $this->animetheme
? $this->animetheme
: $this->animetheme()->withoutGlobalScope(WithoutInsertSongScope::class)->first();
$theme = is_null($this->animetheme)
? $this->animetheme()->withoutGlobalScope(WithoutInsertSongScope::class)->first()
: $this->animetheme;
if (is_null($theme)) {
return strval($this->getKey());
}
return Str::of($this->anime->name)
->append(' ')