Assocate a locations asset with User, not log. (#2973)

This fixes an issue where locations could not be deleted if at any point
they had an associated log entry.  Fixes #2916
This commit is contained in:
Daniel Meltzer 2016-11-24 14:48:22 -06:00 committed by snipe
parent b8cbf0022e
commit 3592bdb2e1

View file

@ -50,7 +50,7 @@ class Location extends SnipeModel
public function assets() public function assets()
{ {
return $this->hasManyThrough('\App\Models\Asset', '\App\Models\Actionlog', 'location_id', 'id'); return $this->hasManyThrough('\App\Models\Asset', '\App\Models\User', 'location_id', 'assigned_to', 'id');
} }
public function assignedassets() public function assignedassets()