Skip to content

Commit

Permalink
fixes a weird sqlite error, such that issues and queries views lead t…
Browse files Browse the repository at this point in the history
…o an exception if artifacts are connected with issues.
  • Loading branch information
tmerten committed Feb 27, 2015
1 parent ac59fa4 commit 0f3a0b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/query_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def selectable_artifact_types_and_names
project_id, @@locked_artifact_types]

artifacts = ReArtifactProperties.all(:joins => [:re_realizations, :issues, :project],
:conditions => conditions, :group => :id)
:conditions => conditions, :group => "#{ReArtifactProperties.table_name}.id")
artifacts.collect { |a| [ "[#{localized_artifact_type(a)}] #{a.name}", a.id.to_s ] }.sort! { |a, b| a.first <=> b.first }
end

Expand Down Expand Up @@ -100,4 +100,4 @@ def sql_for_artifact_name_search_field(db_table, value, invert)
end
end

Query.send(:include, QueryPatch)
Query.send(:include, QueryPatch)

0 comments on commit 0f3a0b7

Please sign in to comment.