diff --git a/app/Observers/AssetObserver.php b/app/Observers/AssetObserver.php index 2046f0e335..801190d176 100644 --- a/app/Observers/AssetObserver.php +++ b/app/Observers/AssetObserver.php @@ -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;