Fix the fake revisions after introduction of cache

The way I stored it in the linked_revs was the wrong way
This commit is contained in:
Stephan Kulow
2022-10-27 07:33:46 +02:00
parent 9bd6643e8a
commit 38e4996280
2 changed files with 31 additions and 32 deletions

View File

@@ -200,13 +200,12 @@ class DBRevision:
return self._files
@staticmethod
def requests_to_fetch(db, project, package):
def requests_to_fetch(db):
with db.cursor() as cur:
cur.execute(
"""SELECT request_number FROM revisions revs LEFT JOIN requests
reqs ON reqs.number=revs.request_number WHERE reqs.id is null AND
revs.request_number IS NOT NULL and project=%s AND package=%s;""",
(project, package),
revs.request_number IS NOT NULL""",
)
return [row[0] for row in cur.fetchall()]