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;
|
||||
switch ($class) {
|
||||
case 'App\Status':
|
||||
$column = 'id';
|
||||
break;
|
||||
case 'App\Status':
|
||||
$column = 'id';
|
||||
break;
|
||||
|
||||
default:
|
||||
$column = 'id';
|
||||
break;
|
||||
}
|
||||
default:
|
||||
$class = 'App\Status';
|
||||
$column = 'id';
|
||||
break;
|
||||
}
|
||||
|
||||
return (new $class())->where($column, $this->object_id)->firstOrFail();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue