We're ending up wth form errors due to using request.POST, which is
empty.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
def link(request):
context = PatchworkRequestContext(request)
- form = UserPersonLinkForm(request.POST)
if request.method == 'POST':
form = UserPersonLinkForm(request.POST)
if form.is_valid():
context['confirmation'] = None
context['error'] = 'An error occurred during confirmation. ' + \
'Please try again later'
+ else:
+ form = UserPersonLinkForm()
context['linkform'] = form
return render_to_response('patchwork/user-link.html', context)