From d221841e6049d0ad3d8b8071ec3da511c3aae903 Mon Sep 17 00:00:00 2001 From: Ladislav Smola Date: Thu, 16 Aug 2018 11:27:32 +0200 Subject: [PATCH] Inventory collection logging is bad Inventory collection logging is bad --- app/models/manager_refresh/inventory_collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/manager_refresh/inventory_collection.rb b/app/models/manager_refresh/inventory_collection.rb index 235cce21e80..9b5f5b8b7ba 100644 --- a/app/models/manager_refresh/inventory_collection.rb +++ b/app/models/manager_refresh/inventory_collection.rb @@ -659,7 +659,7 @@ def unique_indexes @unique_indexes_cache = model_class.connection.indexes(model_class.table_name).select(&:unique) if @unique_indexes_cache.blank? - raise "#{inventory_collection} and its table #{model_class.table_name} must have a unique index defined, to"\ + raise "#{self} and its table #{model_class.table_name} must have a unique index defined, to"\ " be able to use saver_strategy :concurrent_safe or :concurrent_safe_batch." end @@ -679,7 +679,7 @@ def unique_index_for(keys) uniq_key_candidates = unique_indexes.each_with_object([]) { |i, obj| obj << i if (keys - i.columns.map(&:to_sym)).empty? } if @unique_indexes_cache.blank? - raise "#{inventory_collection} and its table #{model_class.table_name} must have a unique index defined "\ + raise "#{self} and its table #{model_class.table_name} must have a unique index defined "\ "covering columns #{keys} to be able to use saver_strategy :concurrent_safe or :concurrent_safe_batch." end