Skip to content

Commit

Permalink
Merge pull request #6239 from eduardoj/fix_includes
Browse files Browse the repository at this point in the history
Fix scope, removing includes and adding left_outer_joins
  • Loading branch information
Moisés Déniz Alemán committed Nov 13, 2018
2 parents ad2b2fc + d82c6f8 commit e22ced0
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 e22ced0

Please sign in to comment.