Only increment if settings table has a value

(This should only ever come up in the CI tests)
This commit is contained in:
snipe 2017-08-23 14:07:01 -07:00
parent a5870c888e
commit fb6caa35ff

View file

@ -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;