Browse Source

Revert "[Django_warning] NullBooleanField is deprecated. Support for it (except in historical migrations) will be removed in Django 4.0."

This reverts commit b123500100d3ad2c603316d6f8055393ddbfbf70.
Ayush Goyal 4 years ago
parent
commit
a5dfe29031

+ 0 - 18
desktop/core/src/desktop/migrations/0013_alter_document2_is_trashed.py

@@ -1,18 +0,0 @@
-# Generated by Django 3.2.4 on 2021-07-07 00:49
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('desktop', '0012_connector_interface'),
-    ]
-
-    operations = [
-        migrations.AlterField(
-            model_name='document2',
-            name='is_trashed',
-            field=models.BooleanField(db_index=True, default=False, null=True, verbose_name='True if trashed'),
-        ),
-    ]

+ 1 - 1
desktop/core/src/desktop/models.py

@@ -1194,7 +1194,7 @@ class Document2(models.Model):
       db_index=True,
       db_index=True,
       verbose_name=_t('If managed under the cover by Hue and never by the user')
       verbose_name=_t('If managed under the cover by Hue and never by the user')
   )
   )
-  is_trashed = models.BooleanField(null=True, default=False, db_index=True, verbose_name=_t('True if trashed'))
+  is_trashed = models.NullBooleanField(default=False, db_index=True, verbose_name=_t('True if trashed'))
 
 
   dependencies = models.ManyToManyField('self', symmetrical=False, related_name='dependents', db_index=True)
   dependencies = models.ManyToManyField('self', symmetrical=False, related_name='dependents', db_index=True)