From 02048aa63126974ab227b5805aca0d662a2f8fe8 Mon Sep 17 00:00:00 2001 From: Travis McKinney Date: Thu, 31 Oct 2024 14:21:29 +0000 Subject: [PATCH] use oauth2_provider get model helper in logout --- openedx/core/djangoapps/user_authn/views/logout.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/user_authn/views/logout.py b/openedx/core/djangoapps/user_authn/views/logout.py index ae74aa6f8adb..ede89f3c9939 100644 --- a/openedx/core/djangoapps/user_authn/views/logout.py +++ b/openedx/core/djangoapps/user_authn/views/logout.py @@ -10,7 +10,8 @@ from django.contrib.auth import logout from django.utils.http import urlencode from django.views.generic import TemplateView -from oauth2_provider.models import Application +# @medality_custom +from oauth2_provider.models import get_application_model from openedx.core.djangoapps.safe_sessions.middleware import mark_user_change_as_expected from openedx.core.djangoapps.user_authn.cookies import delete_logged_in_cookies @@ -132,7 +133,8 @@ def get_context_data(self, **kwargs): # Add the logout URIs for IDAs that the user was logged into (according to the session). This line is specific # to DOP. - uris += Application.objects.filter(client_id__in=self.oauth_client_ids, + # @medality_custom + uris += get_application_model().objects.filter(client_id__in=self.oauth_client_ids, redirect_uris__isnull=False).values_list('redirect_uris', flat=True) # Add the extra logout URIs from settings. This is added as a stop-gap solution for sessions that were