Skip to content

Commit

Permalink
Fix in django form field error
Browse files Browse the repository at this point in the history
  • Loading branch information
pinda committed Jun 24, 2010
1 parent a6d8178 commit 48c4c6c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions blproject/forms.py
Expand Up @@ -46,10 +46,14 @@ def clean_tags(self):

# Project name must always be a tag
# getting name field if not cleaned
name = self.fields["name"] or self.cleaned_data["name"]
project_tag = slugify(name) # getting name field
if project_tag not in tag_list:
tags = project_tag + ',' + tags
try:
name = self.cleaned_data["name"]
except:
pass
else:
project_tag = slugify(name) # getting name field
if project_tag not in tag_list:
tags = project_tag + ',' + tags

return tags

Expand Down

0 comments on commit 48c4c6c

Please sign in to comment.