mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fix travis with new observer code (#3683)
* Rearrange travis order in attempt to fix null settings. * Use auth::id instead of fetching it off the user. Fixes a null object reference during seeding.
This commit is contained in:
parent
e009bb956d
commit
d12159c042
|
@ -22,9 +22,9 @@ before_script:
|
|||
- php artisan migrate --env=testing-ci --database=mysql --force
|
||||
- ./vendor/bin/codecept build
|
||||
- php artisan --env=testing-ci key:generate
|
||||
- php artisan --env=testing-ci snipeit:travisci-install
|
||||
- php artisan --env=testing-ci db:seed --database=mysql --force
|
||||
- php artisan --env=testing-ci snipeit:create-admin --first_name=Alison --last_name=Foobar --email=me@example.com --username=snipe --password=password
|
||||
- php artisan --env=testing-ci snipeit:travisci-install
|
||||
- php artisan --env=testing-ci passport:install
|
||||
- php artisan serve --env=testing-ci --port=8000 --host=localhost &
|
||||
- sleep 5
|
||||
|
|
|
@ -22,7 +22,7 @@ class AccessoryObserver
|
|||
$logAction->item_type = Accessory::class;
|
||||
$logAction->item_id = $accessory->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('update');
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ class AccessoryObserver
|
|||
$logAction->item_type = Accessory::class;
|
||||
$logAction->item_id = $accessory->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('create');
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class AccessoryObserver
|
|||
$logAction->item_type = Accessory::class;
|
||||
$logAction->item_id = $accessory->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('delete');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class AssetObserver
|
|||
$logAction->item_type = Asset::class;
|
||||
$logAction->item_id = $asset->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('update');
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ class AssetObserver
|
|||
$logAction->item_type = Asset::class;
|
||||
$logAction->item_id = $asset->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('create');
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class AssetObserver
|
|||
$logAction->item_type = Asset::class;
|
||||
$logAction->item_id = $asset->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('delete');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class ComponentObserver
|
|||
$logAction->item_type = Component::class;
|
||||
$logAction->item_id = $component->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('update');
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ class ComponentObserver
|
|||
$logAction->item_type = Component::class;
|
||||
$logAction->item_id = $component->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('create');
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class ComponentObserver
|
|||
$logAction->item_type = Component::class;
|
||||
$logAction->item_id = $component->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('delete');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class ConsumableObserver
|
|||
$logAction->item_type = Consumable::class;
|
||||
$logAction->item_id = $consumable->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('update');
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ class ConsumableObserver
|
|||
$logAction->item_type = Consumable::class;
|
||||
$logAction->item_id = $consumable->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('create');
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class ConsumableObserver
|
|||
$logAction->item_type = Consumable::class;
|
||||
$logAction->item_id = $consumable->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('delete');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ class LicenseObserver
|
|||
$logAction->item_type = License::class;
|
||||
$logAction->item_id = $license->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('update');
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ class LicenseObserver
|
|||
$logAction->item_type = License::class;
|
||||
$logAction->item_id = $license->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('create');
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class LicenseObserver
|
|||
$logAction->item_type = License::class;
|
||||
$logAction->item_id = $license->id;
|
||||
$logAction->created_at = date("Y-m-d H:i:s");
|
||||
$logAction->user_id = Auth::user()->id;
|
||||
$logAction->user_id = Auth::id();
|
||||
$logAction->logaction('delete');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue