mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
No idea why this is needed, but…
This commit is contained in:
parent
733921f1f9
commit
53a1511cac
|
@ -31,7 +31,7 @@ class MigrateDenormedAssetLocations extends Migration
|
|||
$assigned_user_assets = Asset::where('assigned_type',User::class)->whereNotNull('assigned_to')->get();
|
||||
\Log::debug('User-assigned assets:');
|
||||
foreach ($assigned_user_assets as $assigned_user_asset) {
|
||||
if ($assigned_user_asset->assignedTo->userLoc) {
|
||||
if (($assigned_user_asset->assignedTo) && ($assigned_user_asset->assignedTo->userLoc)) {
|
||||
$new_location=$assigned_user_asset->assignedTo->userloc->id;
|
||||
\Log::info(' They are in '.$assigned_user_asset->assignedTo->userloc->name.' which is id: '.$new_location);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue