1
0
Fork 0
forked from mirror/pixelfed

Update Report model

This commit is contained in:
Daniel Supernault 2018-11-03 21:25:26 -06:00
parent 7492194cc2
commit 9f29ab9338
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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();
}