updated asset in asset helper
This commit is contained in:
@@ -89,7 +89,7 @@ class ProcessAssetsJob implements ShouldQueue
|
|||||||
foreach($assets as $asset) {
|
foreach($assets as $asset) {
|
||||||
//If the asset is in one of the locations we want, then store
|
//If the asset is in one of the locations we want, then store
|
||||||
//or update the asset
|
//or update the asset
|
||||||
if(in_array($asset->location_flag, $this->location_array)) {
|
if(in_array($this->location_array, $asset->location_flag)) {
|
||||||
//Attempt to store the asset
|
//Attempt to store the asset
|
||||||
$aHelper->StoreNewAsset($asset);
|
$aHelper->StoreNewAsset($asset);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,11 +134,7 @@ class AssetHelper {
|
|||||||
* Update an existing asset based off the esi pull
|
* Update an existing asset based off the esi pull
|
||||||
*/
|
*/
|
||||||
private function UpdateAsset($asset) {
|
private function UpdateAsset($asset) {
|
||||||
$count = Asset::where([
|
|
||||||
'item_id' => $asset->item_id,
|
|
||||||
])->count();
|
|
||||||
|
|
||||||
if($count != 0) {
|
|
||||||
Asset::where([
|
Asset::where([
|
||||||
'item_id' => $asset->item_id,
|
'item_id' => $asset->item_id,
|
||||||
])->update([
|
])->update([
|
||||||
@@ -152,6 +148,5 @@ class AssetHelper {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user