diff --git a/apps/news/migrations/0041_auto_20191211_1406.py b/apps/news/migrations/0041_auto_20191211_1406.py new file mode 100644 index 00000000..70ca5cf1 --- /dev/null +++ b/apps/news/migrations/0041_auto_20191211_1406.py @@ -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')}, + ), + ] diff --git a/apps/news/models.py b/apps/news/models.py index f54378b6..69ccf392 100644 --- a/apps/news/models.py +++ b/apps/news/models.py @@ -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'),)