Few more migration fixes

This commit is contained in:
snipe 2017-10-31 08:57:57 -07:00
parent 6186c324b5
commit a1eac967a7

View file

@ -80,7 +80,7 @@ class MigrateDenormedAssetLocations extends Migration
$assets = Asset::get(); $assets = Asset::get();
foreach ($assets as $asset) { foreach ($assets as $asset) {
if (($asset) && ($asset->location_id != $asset->assetLoc()->id)) { if (($asset) && ($asset->assetLoc()) && ($asset->location_id != $asset->assetLoc()->id)) {
\Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location"); \Log::info('MISMATCH MISMATCH '.$asset->id. "doesn't match its location");
} }
} }