From 2418587ae1a7ad463988c14cc9b0d9a2f9cf0e95 Mon Sep 17 00:00:00 2001 From: Sean Smith Date: Mon, 17 Aug 2020 14:25:18 -0400 Subject: Fix weird model declaration Signed-off-by: Sean Smith Change-Id: I63f2b14982ce7cf30be90cd455e396b551bbaff6 --- src/account/views.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/account') diff --git a/src/account/views.py b/src/account/views.py index d0cfb22..f282369 100644 --- a/src/account/views.py +++ b/src/account/views.py @@ -61,16 +61,15 @@ class AccountSettingsView(UpdateView): class MyOIDCAB(OIDCAuthenticationBackend): def filter_users_by_claims(self, claims): - email = claims.get(email=email) + email = claims.get('email') if not email: - return self.UserModel.objects.none() + return self.User.objects.none() try: - profile = Profile.objects.get(email=email) - return profile.user - - except Profile.DoesNotExist: - return self.UserModel.objects.none() + profile = UserProfile.objects.get('email') + return profile + except UserProfile.DoesNotExist: + return self.User.objects.none() class JiraLoginView(RedirectView): -- cgit 1.2.3-korg