Little correction on content tag management.
authorcavaliet
Mon, 06 Feb 2012 12:08:21 +0100
changeset 530 a69f1af2fe47
parent 527 348844fc63ce
child 531 7bb62216b289
Little correction on content tag management.
src/ldt/ldt/ldt_utils/forms.py
--- a/src/ldt/ldt/ldt_utils/forms.py	Mon Feb 06 10:35:48 2012 +0100
+++ b/src/ldt/ldt/ldt_utils/forms.py	Mon Feb 06 12:08:21 2012 +0100
@@ -68,8 +68,9 @@
         if not iriurl_data:
             iriurl_data = "%s/%s.iri" % (iri_id_data, iri_id_data)    
         cleaned_data['iriurl'] = iriurl_data
-        # we add a comma to the tag list, to force comma separated list and enable tags with spaces.
-        cleaned_data['tags'] = cleaned_data['tags'] + ','
+        # if needed, we add a comma to the tag list, to force comma separated list and enable tags with spaces.
+        if ',' not in cleaned_data['tags'] :
+            cleaned_data['tags'] = cleaned_data['tags'] + ','
         return cleaned_data
     
     class Meta: