remove wrong unique constraint

This commit is contained in:
Kuroshini 2019-12-11 17:07:29 +03:00
parent df00ceaa02
commit f182ec4981
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 2.2.7 on 2019-12-11 14:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('gallery', '0006_merge_20191027_1758'),
('news', '0040_remove_news_slug'),
]
operations = [
migrations.AlterUniqueTogether(
name='newsgallery',
unique_together={('news', 'image')},
),
]

View File

@ -320,4 +320,4 @@ class NewsGallery(IntermediateGalleryModelMixin):
"""NewsGallery meta class."""
verbose_name = _('news gallery')
verbose_name_plural = _('news galleries')
unique_together = (('news', 'is_main'), ('news', 'image'))
unique_together = (('news', 'image'),)