summaryrefslogtreecommitdiff
path: root/packages/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/views.py')
-rw-r--r--packages/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/views.py b/packages/views.py
index e9162c0f..0fa781c4 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -18,9 +18,10 @@ def update(request):
if request.POST.has_key('disown'):
mode = 'disown'
message = 'Disown was successful'
- try:
- maint = User.objects.get(username=request.user.username)
- except User.DoesNotExist:
+
+ if request.user.is_authenticated():
+ maint = request.user
+ else:
return render_response(request, 'error_page.html', {'errmsg':'No maintainer record found! Are you a maintainer?'})
ids = request.POST.getlist('pkgid')
for id in ids: