lib/motor/alerts/persistance.rb in motor-admin-0.1.9 vs lib/motor/alerts/persistance.rb in motor-admin-0.1.10
- old
+ new
@@ -42,13 +42,12 @@
rescue ActiveRecord::RecordNotUnique
retry
end
def update_from_params!(alert, params)
- raise NameAlreadyExists if name_already_exists?(alert)
-
alert = assign_attributes(alert, params)
+ raise NameAlreadyExists if name_already_exists?(alert)
raise InvalidInterval unless alert.cron
ApplicationRecord.transaction do
alert.save!
end