diff --git a/app/models/application_model/can_assets.rb b/app/models/application_model/can_assets.rb index c1f084390..5a15d9897 100644 --- a/app/models/application_model/can_assets.rb +++ b/app/models/application_model/can_assets.rb @@ -145,7 +145,9 @@ get assets of object list def assets_of_object_list(list, assets = {}) list.each do |item| require_dependency item['object'].to_filename - record = Kernel.const_get(item['object']).find(item['o_id']) + record = Kernel.const_get(item['object']).lookup(id: item['o_id']) + next if record.blank? + assets = record.assets(assets) if item['created_by_id'].present? user = User.find(item['created_by_id'])