Revision: remove salt field.

It's not really needed. More information in the respective change
in the js client.
This commit is contained in:
Tom Hacohen 2020-06-26 11:21:53 +03:00
parent 2b52eec41f
commit c00cf50163
3 changed files with 18 additions and 3 deletions

View File

@ -0,0 +1,17 @@
# Generated by Django 3.0.3 on 2020-06-26 08:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('django_etebase', '0019_auto_20200626_0748'),
]
operations = [
migrations.RemoveField(
model_name='collectionitemrevision',
name='salt',
),
]

View File

@ -110,7 +110,6 @@ class CollectionItemRevision(models.Model):
stoken = models.OneToOneField(Stoken, on_delete=models.PROTECT)
uid = models.CharField(db_index=True, unique=True, blank=False, null=False,
max_length=43, validators=[Base64Url256BitlValidator])
salt = models.BinaryField(editable=True, blank=False, null=False, default=b'')
item = models.ForeignKey(CollectionItem, related_name='revisions', on_delete=models.CASCADE)
meta = models.BinaryField(editable=True, blank=False, null=False)
current = models.BooleanField(db_index=True, default=True, null=True)

View File

@ -107,12 +107,11 @@ class CollectionItemRevisionSerializer(serializers.ModelSerializer):
queryset=models.RevisionChunkRelation.objects.all(),
many=True
)
salt = BinaryBase64Field()
meta = BinaryBase64Field()
class Meta:
model = models.CollectionItemRevision
fields = ('chunks', 'meta', 'uid', 'salt', 'deleted')
fields = ('chunks', 'meta', 'uid', 'deleted')
class CollectionItemSerializer(serializers.ModelSerializer):