Fixed bug in changeset queries

The 'or' condition needed to be bracketed within larger 'and' expression.
This commit is contained in:
Matt Amos 2011-03-15 02:00:50 +00:00 committed by Tom Hughes
parent 4e156fb9d1
commit f3ff36418b
2 changed files with 9 additions and 1 deletions

View file

@ -436,7 +436,7 @@ private
# query changesets which are closed
# ('closed at' time has passed or changes limit is hit)
def conditions_closed(closed)
return closed.nil? ? nil : ['closed_at < ? or num_changes > ?',
return closed.nil? ? nil : ['(closed_at < ? or num_changes > ?)',
Time.now.getutc, Changeset::MAX_ELEMENTS]
end