Skip to content

Commit

Permalink
Added a constrain for clientfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanovic committed Feb 5, 2019
1 parent 88d4b0b commit e132c2b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cvat/apps/engine/migrations/0026_auto_20190206_0025.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.1.5 on 2019-02-05 21:25

import cvat.apps.engine.models
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('engine', '0025_auto_20190205_2256'),
]

operations = [
migrations.AlterField(
model_name='clientfile',
name='file',
field=models.FileField(storage=cvat.apps.engine.models.MyFileSystemStorage(), upload_to=cvat.apps.engine.models.upload_path_handler),
),
migrations.AlterUniqueTogether(
name='clientfile',
unique_together={('task', 'file')},
),
]
1 change: 1 addition & 0 deletions cvat/apps/engine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class ClientFile(models.Model):

class Meta:
default_permissions = ()
unique_together = ("task", "file")

# For server files on the mounted share
class ServerFile(models.Model):
Expand Down

0 comments on commit e132c2b

Please sign in to comment.