From: Jan Szejko Date: Thu, 19 Jan 2017 12:18:11 +0000 (+0100) Subject: allow no tags in tagged models X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/215471e368740a54edf403f53e3441ec2b541062?ds=inline allow no tags in tagged models --- diff --git a/apps/catalogue/models/document.py b/apps/catalogue/models/document.py index d58a4d1f..38c21100 100755 --- a/apps/catalogue/models/document.py +++ b/apps/catalogue/models/document.py @@ -25,7 +25,7 @@ class Document(Ref): stage = models.CharField(_('stage'), max_length=128, blank=True, default=STAGES[0]) assigned_to = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, related_name='assignments') deleted = models.BooleanField(default=False) - tags = models.ManyToManyField(Tag) + tags = models.ManyToManyField(Tag, blank=True) # Where to cache searchable stuff from metadata? # Probably in some kind of search index. diff --git a/apps/organizations/models.py b/apps/organizations/models.py index 6a7aa7ac..6b1d918d 100644 --- a/apps/organizations/models.py +++ b/apps/organizations/models.py @@ -104,7 +104,7 @@ class Organization(Card): preview_html_template = 'organizations/snippets/organization.html' name = models.CharField(max_length=1024) - tags = models.ManyToManyField('catalogue.Tag') + tags = models.ManyToManyField('catalogue.Tag', blank=True) # logo = models.ImageField(upload_to='people/logo', blank=True) # country = models.CharField(max_length=64, blank=True, choices=countries) # www = models.URLField(blank=True)