aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patchwork/models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/patchwork/models.py b/patchwork/models.py
index f8d2472..d4075cf 100644
--- a/patchwork/models.py
+++ b/patchwork/models.py
@@ -574,8 +574,12 @@ class Comment(EmailMixin, models.Model):
def save(self, *args, **kwargs):
super(Comment, self).save(*args, **kwargs)
- if hasattr(self.submission, 'patch'):
- self.submission.patch.refresh_tag_counts()
+ # NOTE(stephenfin): Mitigate an issue with Python 3.4 + Django 1.6
+ try:
+ if hasattr(self.submission, 'patch'):
+ self.submission.patch.refresh_tag_counts()
+ except Patch.DoesNotExist:
+ pass
def delete(self, *args, **kwargs):
super(Comment, self).delete(*args, **kwargs)