Merge "Fix "too many SQL variables" error"

This commit is contained in:
Jenkins 2016-07-26 17:23:22 +00:00 committed by Gerrit Code Review
commit d3a6be76ce
1 changed files with 3 additions and 2 deletions

View File

@ -832,8 +832,9 @@ class DatabaseSession(object):
# the set of supplied IDs. This is used when sync'ing the changesets # the set of supplied IDs. This is used when sync'ing the changesets
# locally with the remote changes. # locally with the remote changes.
if not ids: if not ids:
return set([]) return set()
return set([r[0] for r in self.session().query(Change.id).filter(Change.id.in_(ids)).all()]) query = self.session().query(Change.id)
return set(ids).intersection(r[0] for r in query.all())
def getChangesByChangeID(self, change_id): def getChangesByChangeID(self, change_id):
try: try: