diff options
author | Magnus Hagander | 2021-12-12 14:08:40 +0000 |
---|---|---|
committer | Magnus Hagander | 2021-12-12 14:13:10 +0000 |
commit | 1537d0e89d2c6ac57a047444a29eace8eb2a9bb7 (patch) | |
tree | 65bb981bc37a6ece059759f27226da134592cfe8 | |
parent | 5cfc7d20e0e38174a04e345600efcb377f9239cc (diff) |
Update for django 3.2 compatibility
-rw-r--r-- | pgcommitfest/commitfest/migrations/0001_initial.py | 2 | ||||
-rw-r--r-- | pgcommitfest/commitfest/models.py | 2 | ||||
-rw-r--r-- | pgcommitfest/settings.py | 2 | ||||
-rwxr-xr-x | tools/commitfest/check_patches_in_archives.py | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/pgcommitfest/commitfest/migrations/0001_initial.py b/pgcommitfest/commitfest/migrations/0001_initial.py index a0a3db0..a58a5e1 100644 --- a/pgcommitfest/commitfest/migrations/0001_initial.py +++ b/pgcommitfest/commitfest/migrations/0001_initial.py @@ -81,7 +81,7 @@ class Migration(migrations.Migration): ('filename', models.CharField(max_length=1000, blank=True)), ('date', models.DateTimeField()), ('author', models.CharField(max_length=500)), - ('ispatch', models.NullBooleanField()), + ('ispatch', models.BooleanField(null=True)), ('mailthread', models.ForeignKey(to='commitfest.MailThread', on_delete=models.CASCADE)), ], options={ diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 3b7049a..28722f0 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -307,7 +307,7 @@ class MailThreadAttachment(models.Model): filename = models.CharField(max_length=1000, null=False, blank=True) date = models.DateTimeField(null=False, blank=False) author = models.CharField(max_length=500, null=False, blank=False) - ispatch = models.NullBooleanField() + ispatch = models.BooleanField(null=True) class Meta: ordering = ('-date',) diff --git a/pgcommitfest/settings.py b/pgcommitfest/settings.py index 4b6ff00..d83d994 100644 --- a/pgcommitfest/settings.py +++ b/pgcommitfest/settings.py @@ -22,6 +22,8 @@ DATABASES = { } } +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' + # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. diff --git a/tools/commitfest/check_patches_in_archives.py b/tools/commitfest/check_patches_in_archives.py index 5e60175..148de2b 100755 --- a/tools/commitfest/check_patches_in_archives.py +++ b/tools/commitfest/check_patches_in_archives.py @@ -42,7 +42,7 @@ if __name__ == "__main__": # We will hit the archives without delay when doing this, but that # should generally not be a problem because it's not going to be # downloading a lot... - for a in MailThreadAttachment.objects.filter(ispatch=None): + for a in MailThreadAttachment.objects.filter(ispatch__isnull=True): url = "/message-id/attachment/%s/attach" % a.attachmentid logging.debug("Checking attachment %s" % a.attachmentid) |