From: Jeremy Kerr Date: Thu, 4 Jun 2015 09:49:01 +0000 (+0800) Subject: patchwork/models: Use OneToOneField for PatchChangeNotifcation.patch X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=8afd42350101786a542833b6d08b924d4c9f965a;p=patchwork patchwork/models: Use OneToOneField for PatchChangeNotifcation.patch Same functionality, but we suppress an error from django 1.8+ Signed-off-by: Jeremy Kerr --- diff --git a/patchwork/models.py b/patchwork/models.py index 928ddec..c2b8a9c 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -440,7 +440,7 @@ class EmailOptout(models.Model): return cls.objects.filter(email = email).count() > 0 class PatchChangeNotification(models.Model): - patch = models.ForeignKey(Patch, primary_key = True) + patch = models.OneToOneField(Patch, primary_key = True) last_modified = models.DateTimeField(default = datetime.datetime.now) orig_state = models.ForeignKey(State)