mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 19:59:18 -08:00
Only increment if settings table has a value
(This should only ever come up in the CI tests)
This commit is contained in:
parent
a5870c888e
commit
fb6caa35ff
|
@ -43,8 +43,9 @@ class AssetObserver
|
|||
*/
|
||||
public function created(Asset $asset)
|
||||
{
|
||||
$settings = Setting::first();
|
||||
$settings->increment('next_auto_tag_base');
|
||||
if ($settings = Setting::first()) {
|
||||
$settings->increment('next_auto_tag_base');
|
||||
}
|
||||
|
||||
$logAction = new Actionlog();
|
||||
$logAction->item_type = Asset::class;
|
||||
|
|
Loading…
Reference in a new issue