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

rely on `where` to ignore nil

ulferts047306a4516c
diff --git a/app/models/queries/filters/base.rb b/app/models/queries/filters/base.rb
index 7525171dd31..633837aef96 100644
--- a/app/models/queries/filters/base.rb
+++ b/app/models/queries/filters/base.rb
@@ -103,7 +103,7 @@ class Queries::Filters::Base
end
def apply_to(query_scope)
- query_scope = query_scope.where(where) if where
+ query_scope = query_scope.where(where)
query_scope = query_scope.from(from) if from
query_scope = query_scope.joins(joins) if joins
query_scope = query_scope.left_outer_joins(left_outer_joins) if left_outer_joins