Show More
@@ -333,11 +333,11 b' class ThreadForm(PostForm):' | |||||
333 |
|
333 | |||
334 | required_tag_exists = False |
|
334 | required_tag_exists = False | |
335 | for tag in tags.split(): |
|
335 | for tag in tags.split(): | |
336 | tag_model = Tag.objects.filter(name=tag.strip().lower(), |
|
336 | try: | |
337 | required=True) |
|
337 | Tag.objects.get(name=tag.strip().lower(), required=True) | |
338 | if tag_model.exists(): |
|
|||
339 | required_tag_exists = True |
|
|||
340 | break |
|
338 | break | |
|
339 | except ObjectDoesNotExist: | |||
|
340 | pass | |||
341 |
|
341 | |||
342 | if not required_tag_exists: |
|
342 | if not required_tag_exists: | |
343 | all_tags = Tag.objects.filter(required=True) |
|
343 | all_tags = Tag.objects.filter(required=True) |
General Comments 0
You need to be logged in to leave comments.
Login now