From: qw3rty Date: Tue, 15 Jun 2010 17:52:45 +0000 (+0000) Subject: fixed an error inside of the TagNamesField method X-Git-Tag: live~708 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/416900811aee814428b3516f048cd2bf245179f7 fixed an error inside of the TagNamesField method git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@424 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/forms/qanda.py b/forum/forms/qanda.py index f38a382..a3c093c 100644 --- a/forum/forms/qanda.py +++ b/forum/forms/qanda.py @@ -87,7 +87,7 @@ class TagNamesField(forms.CharField): list_temp = [] tagname_re = re.compile(r'^[\w+\.-]+$', re.UNICODE) - for key,tag in list: + for key,tag in list.items(): if len(tag) > settings.FORM_MAX_LENGTH_OF_TAG or len(tag) < settings.FORM_MIN_LENGTH_OF_TAG: raise forms.ValidationError(_('please use between %(min)s and %(max)s characters in you tags') % { 'min': settings.FORM_MIN_LENGTH_OF_TAG, 'max': settings.FORM_MAX_LENGTH_OF_TAG}) if not tagname_re.match(tag):