Commit 155dfb0d authored by HgO's avatar HgO

fix bug when topic has whitespaces in its name

parent 6b56022b
......@@ -234,14 +234,23 @@ class Event:
details.append('- ' + str(workgroup))
details.append('')
topics = event_config.get('tags', '')
tags = event_config.get('tags', '')
if len(self.topics):
if topics:
topics += ' '
topics += ' '.join(('#' + topic.name for topic in self.topics))
if tags:
tags += ' '
if topics:
details.append(topics)
topics = []
for topic in self.topics:
tag = '#'
for part in topic.name.split():
tag += part.capitalize()
topics.append(tag)
tags += ' '.join(topics)
if tags:
details.append(tags)
return '\n'.join(details).rstrip()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment