summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/views/user.py
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2010-08-11 16:28:25 +0800
committerJeremy Kerr <jk@ozlabs.org>2010-08-11 16:28:25 +0800
commitea09c81af4cc913934d5b9b3f5c6c0fffe2adfa0 (patch)
tree2e3d0634699c9a5dd58fb05713a46a0314676a66 /apps/patchwork/views/user.py
parent60abdf19a2d9c26b567c39cfbacc500ba6da22c7 (diff)
downloadpatchwork-ea09c81af4cc913934d5b9b3f5c6c0fffe2adfa0.tar.bz2
patchwork-ea09c81af4cc913934d5b9b3f5c6c0fffe2adfa0.tar.xz
views/user: don't refer to request.POST for non-POST requests
We're ending up wth form errors due to using request.POST, which is empty. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/views/user.py')
-rw-r--r--apps/patchwork/views/user.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/patchwork/views/user.py b/apps/patchwork/views/user.py
index f9ff7f8..8358cbd 100644
--- a/apps/patchwork/views/user.py
+++ b/apps/patchwork/views/user.py
@@ -63,7 +63,6 @@ def profile(request):
def link(request):
context = PatchworkRequestContext(request)
- form = UserPersonLinkForm(request.POST)
if request.method == 'POST':
form = UserPersonLinkForm(request.POST)
if form.is_valid():
@@ -82,6 +81,8 @@ def link(request):
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)