From aa7fc2434d5fb6bcdd9a3fdea7872380647c32c6 Mon Sep 17 00:00:00 2001 From: bain Date: Wed, 27 Mar 2024 20:16:45 +0100 Subject: [PATCH] fix AssertionError --- pronotepy/ent/generic_func.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pronotepy/ent/generic_func.py b/pronotepy/ent/generic_func.py index 57c594a..5509679 100644 --- a/pronotepy/ent/generic_func.py +++ b/pronotepy/ent/generic_func.py @@ -31,11 +31,11 @@ def _sso_redirect( soup = BeautifulSoup(response.text, "html.parser") saml = soup.find("input", {"name": saml_type}) - assert isinstance(saml, Tag) - if not saml: return None + assert isinstance(saml, Tag) + payload = {saml_type: saml.get("value")} relay_state = soup.find("input", {"name": "RelayState"})