Update for django 3.2 compatibility
authorMagnus Hagander <magnus@hagander.net>
Sun, 12 Dec 2021 14:08:40 +0000 (15:08 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 12 Dec 2021 14:13:10 +0000 (15:13 +0100)
pgcommitfest/commitfest/migrations/0001_initial.py
pgcommitfest/commitfest/models.py
pgcommitfest/settings.py
tools/commitfest/check_patches_in_archives.py

index a0a3db0ceb5244acffa19d5d7911b38612ed3914..a58a5e188a86199b0b32ff22940793796d7ddac9 100644 (file)
@@ -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={
index 3b7049a65e1ca0b8eb686d7bd3b51b649aa0cb62..28722f06f2c3ac26e67f2ea0643cd2d180275c24 100644 (file)
@@ -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',)
index 4b6ff00ddfd2a02c0850f801d4161e35de9562f7..d83d994b3271f59dc058453d8a36b7cde611021c 100644 (file)
@@ -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.
index 5e601752084ad7555dfac141cc814cd246f179f3..148de2bfcdfe3e1e16db69de87089d5860d06810 100755 (executable)
@@ -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)