mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-11 00:54:50 +00:00
Add a limit(1) since hasOne
does not append this automatically and expects the key to be unique - could incur weird behavior.
This commit is contained in:
parent
db7396e5c2
commit
00014b521a
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class Status extends Model
|
||||||
|
|
||||||
public function firstMedia()
|
public function firstMedia()
|
||||||
{
|
{
|
||||||
return $this->hasOne(Media::class)->orderBy('order', 'asc');
|
return $this->hasOne(Media::class)->orderBy('order', 'asc')->limit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function thumb()
|
public function thumb()
|
||||||
|
|
Loading…
Reference in a new issue