Skip to content

Commit

Permalink
Fix scope removing includes
Browse files Browse the repository at this point in the history
... and adding left_outer_joins.

Kudos to mdeniz@suse.com for pointing it out.
  • Loading branch information
eduardoj committed Nov 13, 2018
1 parent 4f1268f commit d82c6f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/app/models/staging/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def self.table_name_prefix
belongs_to :project, inverse_of: :staging
has_many :staging_projects, class_name: 'Project', inverse_of: :staging_workflow, dependent: :nullify, foreign_key: 'staging_workflow_id' do
def without_staged_requests
includes(:staged_requests).where(bs_requests: { id: nil })
left_outer_joins(:staged_requests).where(bs_requests: { id: nil })
end
end

Expand Down

0 comments on commit d82c6f8

Please sign in to comment.