diff options
author | Sean Smith <ssmith@iol.unh.edu> | 2020-08-17 14:25:18 -0400 |
---|---|---|
committer | Adam Hassick <ahassick@iol.unh.edu> | 2020-12-04 14:20:41 -0500 |
commit | 2418587ae1a7ad463988c14cc9b0d9a2f9cf0e95 (patch) | |
tree | be6d946d409825ccffc8ee025cabc2a08266c38d /src/account/views.py | |
parent | aa4c5be520939d1e5f45015033a03981477b966a (diff) |
Fix weird model declaration
Signed-off-by: Sean Smith <ssmith@iol.unh.edu>
Change-Id: I63f2b14982ce7cf30be90cd455e396b551bbaff6
Diffstat (limited to 'src/account/views.py')
-rw-r--r-- | src/account/views.py | 13 |
1 files changed, 6 insertions, 7 deletions
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): |