Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Only add the verification form to the context if the task.must_be_ver…
Browse files Browse the repository at this point in the history
…ified

Only add the form on GET and POST
  • Loading branch information
bobsilverberg committed Jul 20, 2015
1 parent c58e8d8 commit f27e67f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions oneanddone/tasks/views.py
Expand Up @@ -419,10 +419,11 @@ def get_context_data(self, *args, **kwargs):
ctx['users'] = task.users_who_completed_this_task

# add verification form to the context
if self.request.method == 'GET':
ctx['verification_form'] = SubmitVerifiedTaskForm()
else:
ctx['verification_form'] = ctx['form']
if task.must_be_verified:
if self.request.method == 'GET':
ctx['verification_form'] = SubmitVerifiedTaskForm()
elif self.request.method == 'POST':
ctx['verification_form'] = ctx['form']

# determine label for Get Started button
if task.is_taken:
Expand Down

0 comments on commit f27e67f

Please sign in to comment.