Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

use index_by for constructing Queries::Operators::OPERATORS

Ivan Kuchin1490e8c661b3
diff --git a/app/models/queries/operators.rb b/app/models/queries/operators.rb
index 7581f53237b..f3454c005db 100644
--- a/app/models/queries/operators.rb
+++ b/app/models/queries/operators.rb
@@ -63,5 +63,5 @@ module Queries::Operators
Queries::Operators::Child
]
- OPERATORS = Hash[*(operators.map { |o| [o.symbol.to_s, o] }).flatten].freeze
+ OPERATORS = operators.index_by { |o| o.symbol.to_s }.freeze
end