Allow to fail if touch of reference fails.
This commit is contained in:
parent
3d878a5547
commit
f6f3504e80
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue