Skip to content

Commit

Permalink
Ignore the importer checkout if user is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
inietov committed Nov 8, 2023
1 parent 92c7de3 commit 7d30001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Importer/AssetImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function createAssetIfNotExists(array $row)
// If we have a target to checkout to, lets do so.
//-- user_id is a property of the abstract class Importer, which this class inherits from and it's setted by
//-- the class that needs to use it (command importer or GUI importer inside the project).
if (isset($target)) {
if (isset($target) && ($target !== false)) {
if (!is_null($asset->assigned_to)){
if ($asset->assigned_to != $target->id){
event(new CheckoutableCheckedIn($asset, User::find($asset->assigned_to), Auth::user(), $asset->notes, date('Y-m-d H:i:s')));
Expand Down

0 comments on commit 7d30001

Please sign in to comment.