Skip to content

Commit

Permalink
Fixes #15773 - disambiguate table name
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonweeks authored and lzap committed Jul 22, 2016
1 parent d163507 commit d9cc252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/host/managed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class Jail < ::Safemode::Jail
end

scope :recent, ->(*args) { where(["last_report > ?", (args.first || (Setting[:puppet_interval] + Setting[:outofsync_interval]).minutes.ago)]) }
scope :out_of_sync, ->(*args) { where(["last_report < ? and enabled != ?", (args.first || (Setting[:puppet_interval] + Setting[:outofsync_interval]).minutes.ago), false]) }
scope :out_of_sync, ->(*args) { where(["last_report < ? and hosts.enabled != ?", (args.first || (Setting[:puppet_interval] + Setting[:outofsync_interval]).minutes.ago), false]) }

scope :with_os, -> { where('hosts.operatingsystem_id IS NOT NULL') }

Expand Down

0 comments on commit d9cc252

Please sign in to comment.