mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update Report model
This commit is contained in:
parent
7492194cc2
commit
9f29ab9338
1 changed files with 8 additions and 7 deletions
|
@ -22,14 +22,15 @@ class Report extends Model
|
||||||
{
|
{
|
||||||
$class = $this->object_type;
|
$class = $this->object_type;
|
||||||
switch ($class) {
|
switch ($class) {
|
||||||
case 'App\Status':
|
case 'App\Status':
|
||||||
$column = 'id';
|
$column = 'id';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$column = 'id';
|
$class = 'App\Status';
|
||||||
break;
|
$column = 'id';
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return (new $class())->where($column, $this->object_id)->firstOrFail();
|
return (new $class())->where($column, $this->object_id)->firstOrFail();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue