changeset 2094:ce4cce38fe51

Use name[0] in Reference element and generated ticket comment
author Cheer Xiao <xiaqqaix@gmail.com>
date Thu, 25 Apr 2013 18:57:23 +0800
parents be05c7f6d216
children c99479988451
files MoinMoin/forms.py MoinMoin/items/ticket.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/forms.py	Thu Apr 25 18:54:31 2013 +0800
+++ b/MoinMoin/forms.py	Thu Apr 25 18:57:23 2013 +0800
@@ -246,7 +246,7 @@
     @classmethod
     def _get_choice_specs(cls):
         revs = flaskg.storage.search(cls._query, **cls._query_args)
-        choices = [(rev.meta[ITEMID], rev.meta[NAME]) for rev in revs]
+        choices = [(rev.meta[ITEMID], rev.meta[NAME][0]) for rev in revs]
         if cls.optional:
             choices.append((u'', cls.properties['empty_label']))
         return choices
--- a/MoinMoin/items/ticket.py	Thu Apr 25 18:54:31 2013 +0800
+++ b/MoinMoin/items/ticket.py	Thu Apr 25 18:57:23 2013 +0800
@@ -130,7 +130,7 @@
 
 %(message)s
 }}}}}}
-''' % dict(author=flaskg.user.name, timestamp=time.time(), message=message)
+''' % dict(author=flaskg.user.name[0], timestamp=time.time(), message=message)
 
 
 @register