From: hernani Date: Wed, 12 May 2010 10:11:18 +0000 (+0000) Subject: Some simple tweaks in actions and models. X-Git-Tag: live~897 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/95d8d68511babfe9ef9a11f59a29b17f65921bff Some simple tweaks in actions and models. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@232 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/actions/meta.py b/forum/actions/meta.py index f5d1394..b16f4f9 100644 --- a/forum/actions/meta.py +++ b/forum/actions/meta.py @@ -196,6 +196,9 @@ class DeleteAction(ActionProxy): else: return _("flagged by multiple users: ") + "; ".join([f.extra for f in FlagAction.objects.filter(node=self.node)]) +class UnknownAction(ActionProxy): + pass + class QuestionViewAction(DummyActionProxy): def __init__(self, node, user, ip=None): diff --git a/forum/models/node.py b/forum/models/node.py index e5468ab..cf69233 100644 --- a/forum/models/node.py +++ b/forum/models/node.py @@ -30,12 +30,13 @@ class NodeContent(models.Model): def tagname_list(self): if self.tagnames: - return [name for name in self.tagnames.split(u' ')] + t = [name.strip() for name in self.tagnames.split(u' ') if name] + return [name.strip() for name in self.tagnames.split(u' ') if name] else: return [] def tagname_meta_generator(self): - return u','.join([unicode(tag) for tag in self.tagname_list()]) + return u','.join([tag for tag in self.tagname_list()]) class Meta: abstract = True