mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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)
|
public function created(Asset $asset)
|
||||||
{
|
{
|
||||||
$settings = Setting::first();
|
if ($settings = Setting::first()) {
|
||||||
$settings->increment('next_auto_tag_base');
|
$settings->increment('next_auto_tag_base');
|
||||||
|
}
|
||||||
|
|
||||||
$logAction = new Actionlog();
|
$logAction = new Actionlog();
|
||||||
$logAction->item_type = Asset::class;
|
$logAction->item_type = Asset::class;
|
||||||
|
|
Loading…
Reference in a new issue