From: Jeremy Kerr Date: Sat, 20 Sep 2008 03:28:54 +0000 (+1000) Subject: [models] Improve comment filter X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=commitdiff_plain;h=b261b3cff0c7f4aacb6c9bda5f5491d340b1af17 [models] Improve comment filter We should be able to search on the patch_id faster. Signed-off-by: Jeremy Kerr --- diff --git a/apps/patchwork/models.py b/apps/patchwork/models.py index c36f960..d70fdb2 100644 --- a/apps/patchwork/models.py +++ b/apps/patchwork/models.py @@ -220,7 +220,7 @@ class Patch(models.Model): def mbox(self): comment = None try: - comment = Comment.objects.get(msgid = self.msgid) + comment = Comment.objects.get(patch = self, msgid = self.msgid) except Exception: pass