]> git.ozlabs.org Git - patchwork/blobdiff - apps/patchwork/models.py
[models] Improve comment filter
[patchwork] / apps / patchwork / models.py
index e516be29d6730664f0a027248d9ec56dcfb9222e..d70fdb208eab49a29eb62daf1487c38db03993ab 100644 (file)
@@ -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
 
@@ -308,6 +308,7 @@ class UserPersonConfirmation(models.Model):
         person.link_to_user(self.user)
         person.save()
         self.active = False
+        self.save()
 
     def save(self):
         max = 1 << 32