Ensure quickupload image field uniqueness

This commit is contained in:
2025-04-10 11:38:33 +02:00
parent 0f961c71e0
commit 6128b6564c
2 changed files with 6 additions and 2 deletions

View File

@ -1115,7 +1115,10 @@ class QuickUploadImage(models.Model):
uuid = models.UUIDField(unique=True, db_index=True)
name = models.CharField(max_length=IMAGE_NAME_SIZE, blank=False)
image = models.ImageField(
upload_to="upload/%Y/%m/%d", width_field="width", height_field="height"
upload_to="upload/%Y/%m/%d",
width_field="width",
height_field="height",
unique=True,
)
uploader = models.ForeignKey(
"User",