From f6f3504e80dcce55cb255ac6a5a9c68bdadab8c2 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 7 Jun 2016 22:06:08 +0200 Subject: [PATCH] Allow to fail if touch of reference fails. --- app/models/application_model.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 1d6620c1c..c470d0965 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -1292,10 +1292,15 @@ touch references by params =end def self.touch_reference_by_params(data) + object_class = Kernel.const_get(data[:object]) object = object_class.lookup(id: data[:o_id]) return if !object object.touch + rescue => e + logger.error e.message + logger.error e.backtrace.inspect + end private