Browse Source

Allow to fail if touch of reference fails.

Martin Edenhofer 8 years ago
parent
commit
f6f3504e80
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/models/application_model.rb

+ 5 - 0
app/models/application_model.rb

@@ -1292,10 +1292,15 @@ touch references by params
 =end
 =end
 
 
   def self.touch_reference_by_params(data)
   def self.touch_reference_by_params(data)
+
     object_class = Kernel.const_get(data[:object])
     object_class = Kernel.const_get(data[:object])
     object = object_class.lookup(id: data[:o_id])
     object = object_class.lookup(id: data[:o_id])
     return if !object
     return if !object
     object.touch
     object.touch
+  rescue => e
+    logger.error e.message
+    logger.error e.backtrace.inspect
+
   end
   end
 
 
   private
   private