diff --git a/src/saml2/mdstore.py b/src/saml2/mdstore.py index 4126e49e0..2ea9742f0 100644 --- a/src/saml2/mdstore.py +++ b/src/saml2/mdstore.py @@ -207,7 +207,7 @@ def attribute_requirement(entity_descriptor, index=None): if index is not None and acs["index"] != index: continue - for attr in acs["requested_attribute"]: + for attr in (acs.get("requested_attribute") or []): if attr.get("is_required") == "true": res["required"].append(attr) else: