Handles missing group by column

pull/724/head
Hagen Schink 11 years ago
parent 6d1a101343
commit d9b370800b
  1. 2
      app/models/query/results.rb

@ -80,7 +80,7 @@ class ::Query::Results
WorkPackage.where(::Query.merge_conditions(query.statement, options[:conditions]))
.includes([:status, :project] + (options[:include] || []).uniq)
.joins(query.group_by_column.alias)
.joins((query.group_by_column ? query.group_by_column.alias : nil))
.order(order_option)
end

Loading…
Cancel
Save