From a3789a5369fa797fb765b3234a4ad796accd28e4 Mon Sep 17 00:00:00 2001 From: hernani Date: Thu, 26 May 2011 19:57:48 +0000 Subject: [PATCH 1/1] Allows possible empty sets of question tags. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1051 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/models/node.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forum/models/node.py b/forum/models/node.py index 286bf4a..96b41dc 100644 --- a/forum/models/node.py +++ b/forum/models/node.py @@ -480,7 +480,10 @@ class Node(BaseModel, NodeContent): super(Node, self).save(*args, **kwargs) if tags_changed: - self.tags = list(Tag.objects.filter(name__in=self.tagname_list())) + if self.tagnames.strip(): + self.tags = list(Tag.objects.filter(name__in=self.tagname_list())) + else: + self.tags = [] class Meta: app_label = 'forum' -- 2.39.5