Skip to content

Commit 6c1cf9e

Browse files
Update models.py
1 parent 9525e71 commit 6c1cf9e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

App/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class FileModel(models.Model):
1313
timestamp = models.DateTimeField(auto_now_add=True)
1414
path = models.FilePathField(path=settings.MEDIA_ROOT, default=settings.MEDIA_ROOT)
1515

16+
class Meta:
17+
unique_together = ['file', 'path']
18+
1619

1720
@receiver(post_delete, sender=FileModel)
1821
def submission_delete(sender, instance, **kwargs):

0 commit comments

Comments
 (0)