summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-02-01 00:52:08 +0100
committerDan McGee <dan@archlinux.org>2010-02-01 00:52:08 +0100
commita16b4d9ecd2a3fa1676e8bc1d69de5e5d41d0d18 (patch)
treeb8e6d39d0513819c1d7fe4ff9eaf777de0ea5440 /devel
parenta32eb2dce6e19445492528f0b93bf3850389c41a (diff)
downloadarchweb-a16b4d9ecd2a3fa1676e8bc1d69de5e5d41d0d18.tar.gz
archweb-a16b4d9ecd2a3fa1676e8bc1d69de5e5d41d0d18.tar.xz
Make marking out of date actually work
And honor the packager's notify flag, as Pierre pointed out. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/devel/views.py b/devel/views.py
index 78c466a..582df76 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -32,11 +32,9 @@ def index(request):
def change_notify(request):
maint = User.objects.get(username=request.user.username)
notify = request.POST.get('notify', 'no')
- try:
- maint.get_profile().notify = notify == 'yes'
- except UserProfile.DoesNotExist:
- UserProfile(user_id=maint.id ,notify=notify == 'yes').save()
- maint.get_profile().save()
+ pf = maint.get_profile()
+ pf.notify = (notify == 'yes')
+ pf.save()
return HttpResponseRedirect('/devel/')
class ProfileForm(forms.Form):