summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/meetingtools/apps/room/views.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index 0eae2f6..ed8c2d6 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -466,12 +466,13 @@ def tag(request,rid):
if request.method == 'POST':
form = TagRoomForm(request.POST)
if form.is_valid():
- tag = form.cleaned_data['tag']
- ok,reason = _can_tag(request,tag)
- if ok:
- Tag.objects.add_tag(room, tag)
- else:
- form._errors['tag'] = form.error_class([u'%s ... please choose another tag!' % reason])
+ for tag in form.cleaned_data['tag'].split(','):
+ tag = tag.strip()
+ ok,reason = _can_tag(request,tag)
+ if ok:
+ Tag.objects.add_tag(room, tag)
+ else:
+ form._errors['tag'] = form.error_class([u'%s ... please choose another tag!' % reason])
else:
form = TagRoomForm()