From 215471e368740a54edf403f53e3441ec2b541062 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 19 Jan 2017 13:18:11 +0100 Subject: [PATCH] allow no tags in tagged models --- apps/catalogue/models/document.py | 2 +- apps/organizations/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 2.20.1