diff options
author | Dan McGee <dan@archlinux.org> | 2010-01-31 17:52:08 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-01-31 17:52:08 -0600 |
commit | a16b4d9ecd2a3fa1676e8bc1d69de5e5d41d0d18 (patch) | |
tree | b8e6d39d0513819c1d7fe4ff9eaf777de0ea5440 /devel/views.py | |
parent | a32eb2dce6e19445492528f0b93bf3850389c41a (diff) |
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/views.py')
-rw-r--r-- | devel/views.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/devel/views.py b/devel/views.py index 78c466ab..582df764 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): |