From: Jeremy Kerr Date: Sat, 20 Sep 2008 03:28:54 +0000 (+1000) Subject: [models] Improve comment filter X-Git-Tag: v0.9.0~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b261b3cff0c7f4aacb6c9bda5f5491d340b1af17;p=thirdparty%2Fpatchwork.git [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 c36f9608..d70fdb20 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