mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
fix: attempt to fix entry name when no theme (#781)
This commit is contained in:
@@ -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(' ')
|
||||
|
||||
Reference in New Issue
Block a user