From e0d593a9b6b8df6497f0a9c0fc222961a32a960c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 26 Feb 2020 20:04:26 +0200 Subject: [PATCH] Collection Item Revision: dissalow blank for the current field. --- .../migrations/0018_auto_20200226_1803.py | 18 ++++++++++++++++++ django_etesync/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 django_etesync/migrations/0018_auto_20200226_1803.py diff --git a/django_etesync/migrations/0018_auto_20200226_1803.py b/django_etesync/migrations/0018_auto_20200226_1803.py new file mode 100644 index 0000000..ae9200d --- /dev/null +++ b/django_etesync/migrations/0018_auto_20200226_1803.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.3 on 2020-02-26 18:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_etesync', '0017_auto_20200226_1455'), + ] + + operations = [ + migrations.AlterField( + model_name='collectionitemrevision', + name='current', + field=models.BooleanField(db_index=True, default=True, null=True), + ), + ] diff --git a/django_etesync/models.py b/django_etesync/models.py index 1792031..b11c36c 100644 --- a/django_etesync/models.py +++ b/django_etesync/models.py @@ -80,7 +80,7 @@ class CollectionItemRevision(models.Model): item = models.ForeignKey(CollectionItem, related_name='revisions', on_delete=models.CASCADE) chunks = models.ManyToManyField(CollectionItemChunk, related_name='items') hmac = models.CharField(max_length=50, blank=False, null=False) - current = models.BooleanField(db_index=True, default=True, blank=True, null=True) + current = models.BooleanField(db_index=True, default=True, null=True) deleted = models.BooleanField(default=False) class Meta: