From a5870c888e6f83b4603fe40c95d4556ce227b25f Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 23 Aug 2017 13:59:59 -0700 Subject: [PATCH] Removed incrementer from non-asset event listeners --- app/Observers/AccessoryObserver.php | 6 +----- app/Observers/ComponentObserver.php | 6 +----- app/Observers/ConsumableObserver.php | 5 +---- app/Observers/LicenseObserver.php | 5 +---- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/app/Observers/AccessoryObserver.php b/app/Observers/AccessoryObserver.php index 4b2f7e1a7f..f84f12d116 100644 --- a/app/Observers/AccessoryObserver.php +++ b/app/Observers/AccessoryObserver.php @@ -28,8 +28,7 @@ class AccessoryObserver /** - * Listen to the Accessory created event, and increment - * the next_auto_tag_base value in the settings table when i + * Listen to the Accessory created event when * a new accessory is created. * * @param Accessory $accessory @@ -37,9 +36,6 @@ class AccessoryObserver */ public function created(Accessory $accessory) { - $settings = Setting::first(); - $settings->increment('next_auto_tag_base'); - $logAction = new Actionlog(); $logAction->item_type = Accessory::class; $logAction->item_id = $accessory->id; diff --git a/app/Observers/ComponentObserver.php b/app/Observers/ComponentObserver.php index e3a977852e..054520fc8e 100644 --- a/app/Observers/ComponentObserver.php +++ b/app/Observers/ComponentObserver.php @@ -28,8 +28,7 @@ class ComponentObserver /** - * Listen to the Component created event, and increment - * the next_auto_tag_base value in the settings table when i + * Listen to the Component created event when * a new component is created. * * @param Component $component @@ -37,9 +36,6 @@ class ComponentObserver */ public function created(Component $component) { - $settings = Setting::first(); - $settings->increment('next_auto_tag_base'); - $logAction = new Actionlog(); $logAction->item_type = Component::class; $logAction->item_id = $component->id; diff --git a/app/Observers/ConsumableObserver.php b/app/Observers/ConsumableObserver.php index 6f1fa9cd04..4b41df0782 100644 --- a/app/Observers/ConsumableObserver.php +++ b/app/Observers/ConsumableObserver.php @@ -28,8 +28,7 @@ class ConsumableObserver /** - * Listen to the Consumable created event, and increment - * the next_auto_tag_base value in the settings table when i + * Listen to the Consumable created event when * a new consumable is created. * * @param Consumable $consumable @@ -37,8 +36,6 @@ class ConsumableObserver */ public function created(Consumable $consumable) { - $settings = Setting::first(); - $settings->increment('next_auto_tag_base'); $logAction = new Actionlog(); $logAction->item_type = Consumable::class; diff --git a/app/Observers/LicenseObserver.php b/app/Observers/LicenseObserver.php index 8ef5ae16e8..19c85ae923 100644 --- a/app/Observers/LicenseObserver.php +++ b/app/Observers/LicenseObserver.php @@ -28,8 +28,7 @@ class LicenseObserver /** - * Listen to the License created event, and increment - * the next_auto_tag_base value in the settings table when i + * Listen to the License created event when * a new license is created. * * @param License $license @@ -37,8 +36,6 @@ class LicenseObserver */ public function created(License $license) { - $settings = Setting::first(); - $settings->increment('next_auto_tag_base'); $logAction = new Actionlog(); $logAction->item_type = License::class;