From 066d49b2c1c8319a5b7805b4a68a8ee2b1c59ad1 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 22 Jan 2013 22:18:08 +0100 Subject: user.get('moo') -> user.moo User fields are always existent, so there is no need to .get() them, just use them directly. Signed-off-by: Sebastian Spaeth --- mediagoblin/edit/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mediagoblin/edit') diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py index 24b0b69b..25a617fd 100644 --- a/mediagoblin/edit/views.py +++ b/mediagoblin/edit/views.py @@ -191,8 +191,8 @@ def edit_profile(request, url_user=None): user = url_user form = forms.EditProfileForm(request.form, - url=user.get('url'), - bio=user.get('bio')) + url=user.url, + bio=user.bio) if request.method == 'POST' and form.validate(): user.url = unicode(request.form['url']) @@ -218,8 +218,8 @@ def edit_profile(request, url_user=None): def edit_account(request): user = request.user form = forms.EditAccountForm(request.form, - wants_comment_notification=user.get('wants_comment_notification'), - license_preference=user.get('license_preference')) + wants_comment_notification=user.wants_comment_notification, + license_preference=user.license_preference) if request.method == 'POST': form_validated = form.validate() -- cgit v1.2.3