diff --git a/passbook/providers/saml/views.py b/passbook/providers/saml/views.py index dbba7fa59..5b7ce4bd8 100644 --- a/passbook/providers/saml/views.py +++ b/passbook/providers/saml/views.py @@ -188,7 +188,9 @@ class SAMLFlowFinalView(StageView): def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: application: Application = self.executor.plan.context[PLAN_CONTEXT_APPLICATION] - provider: SAMLProvider = application.provider + provider: SAMLProvider = get_object_or_404( + SAMLProvider, pk=application.provider_id + ) # Log Application Authorization Event.new( EventAction.AUTHORIZE_APPLICATION,