mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
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:
parent
b8cbf0022e
commit
3592bdb2e1
|
@ -50,7 +50,7 @@ class Location extends SnipeModel
|
|||
|
||||
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()
|
||||
|
|
Loading…
Reference in a new issue