Skip to content

Commit

Permalink
saml: Improve type assertion for /feed
Browse files Browse the repository at this point in the history
  • Loading branch information
dezhidki committed Nov 8, 2022
1 parent 6dfb043 commit 9318cff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion timApp/auth/saml/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,12 @@ def get_idps() -> Response:
ui_info = next(
(d for d in ext_elems if d["__class__"].endswith("ui&UIInfo")), None
)
assert isinstance(ui_info, dict)
if ui_info is None:
log_warning(f"SAML: Could not find UIInfo for {entity_id}")
continue
if not isinstance(ui_info, dict):
log_warning(f"SAML: UIInfo is not a dict for {entity_id}")
continue
# get display names
display_names = [
{
Expand Down

0 comments on commit 9318cff

Please sign in to comment.