From a139f8b6b2bdeffc5ff3c268edf3ee1e8ec959cb Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Tue, 23 Oct 2012 12:04:30 -0400 Subject: [PATCH] Fix incorrect references to userprofile in the API (imported from commit 77c062b54c545185aee28189726f61a874a1fe77) --- zephyr/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zephyr/views.py b/zephyr/views.py index e440cb1dc3..736fb9a6dd 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -760,7 +760,7 @@ def api_fetch_api_key(request): return HttpResponseForbidden("Your username or password is incorrect.") if not user.is_active: return HttpResponseForbidden("Your account has been disabled.") - return HttpResponse(user.user_profile.api_key) + return HttpResponse(user.userprofile.api_key) @login_required_json_view def json_fetch_api_key(request): @@ -770,4 +770,4 @@ def json_fetch_api_key(request): return json_error("You must specify your password to get your API key.") if not request.user.check_password(password): return json_error("Your username or password is incorrect.") - return json_success({"api_key": request.user.user_profile.api_key}) + return json_success({"api_key": request.user.userprofile.api_key})