summaryrefslogtreecommitdiff
path: root/app/models/service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/service.rb')
-rw-r--r--app/models/service.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/service.rb b/app/models/service.rb
index af5ce1635a6..eaf1eaca146 100644
--- a/app/models/service.rb
+++ b/app/models/service.rb
@@ -125,8 +125,9 @@ class Service < ActiveRecord::Base
# ActiveRecord does not provide a mechanism to track changes in serialized keys.
# This is why we need to perform extra query to do it mannually.
def prop_updated?(prop_name)
- return false if send("#{prop_name}_was").nil?
- send("#{prop_name}_was") != send(prop_name)
+ value_was = send("#{prop_name}_was")
+ return false if value_was.nil?
+ value_was != send(prop_name)
end
def async_execute(data)