Fix problems with performance changes

This commit is contained in:
Alexander Meindl 2019-04-09 19:04:42 +02:00
parent f18ba8b557
commit c65721a00f
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ class AdditionalsImport < Import
h[v.custom_field.id.to_s] =
if value.is_a?(Array)
value.map { |val| v.custom_field.value_from_keyword(val.strip, object) }.compact!.flatten!
value.map { |val| v.custom_field.value_from_keyword(val.strip, object) }.compact!.flatten
else
v.custom_field.value_from_keyword(value, object)
end

View File

@ -136,7 +136,7 @@ module AdditionalsQuery
end
def results_scope(options = {})
order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten!.reject!(&:blank?)
order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten!.reject(&:blank?)
objects_scope(options)
.order(order_option)

View File

@ -9,7 +9,7 @@ module Additionals
end
def self.available_project_modules_all
@permissions.collect(&:project_module).uniq!.compact!
@permissions.collect(&:project_module).uniq!.compact
end
end
end