allow no tags in tagged models
authorJan Szejko <janek37@gmail.com>
Thu, 19 Jan 2017 12:18:11 +0000 (13:18 +0100)
committerJan Szejko <janek37@gmail.com>
Thu, 19 Jan 2017 12:18:11 +0000 (13:18 +0100)
apps/catalogue/models/document.py
apps/organizations/models.py

index d58a4d1..38c2110 100755 (executable)
@@ -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)
     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.
 
     # Where to cache searchable stuff from metadata?
     # Probably in some kind of search index.
index 6a7aa7a..6b1d918 100644 (file)
@@ -104,7 +104,7 @@ class Organization(Card):
     preview_html_template = 'organizations/snippets/organization.html'
 
     name = models.CharField(max_length=1024)
     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)
     # logo = models.ImageField(upload_to='people/logo', blank=True)
     # country = models.CharField(max_length=64, blank=True, choices=countries)
     # www = models.URLField(blank=True)