summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/models.py
diff options
context:
space:
mode:
authorMagnus Hagander2018-05-29 19:28:35 +0000
committerMagnus Hagander2018-05-29 19:28:35 +0000
commit9220e6c0506eb9e8f09fe8b79d42a184f362631a (patch)
tree8f8a4573338b19b801e859980ee5097f5a7d1988 /pgcommitfest/commitfest/models.py
parent3fff88c040a47ffa85382ef7ad7e578d4c934bc7 (diff)
Rewrite main CF dashboard query to use SQL
We've long gone past what the django ORM can handle and got into hundreds of queries for large commitfests. And it's not really that hard to rewrite as SQL, even though we have to dynamically build the WHERE clauses. So do that.
Diffstat (limited to 'pgcommitfest/commitfest/models.py')
-rw-r--r--pgcommitfest/commitfest/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py
index 5936b65..8e5a442 100644
--- a/pgcommitfest/commitfest/models.py
+++ b/pgcommitfest/commitfest/models.py
@@ -177,7 +177,7 @@ class PatchOnCommitFest(models.Model):
(STATUS_REJECTED, 'danger'),
(STATUS_RETURNED, 'danger'),
)
- OPEN_STATUSES=(STATUS_REVIEW, STATUS_AUTHOR, STATUS_COMMITTER)
+ OPEN_STATUSES=[STATUS_REVIEW, STATUS_AUTHOR, STATUS_COMMITTER]
OPEN_STATUS_CHOICES=[x for x in _STATUS_CHOICES if x[0] in OPEN_STATUSES]
patch = models.ForeignKey(Patch, blank=False, null=False)