Skip to content

Commit 7af649e

Browse files
author
Roland Hedberg
committed
Merge pull request #84 from novapost/fix_metadata_extension_loading
Ensure valid 'schemas' list if passed as dict in base method
2 parents db91ff2 + 7a3b78b commit 7af649e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/saml2/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,14 @@ def extension_elements_to_elements(extension_elements, schemas):
844844
according to the schemas.
845845
"""
846846
res = []
847+
848+
if isinstance(schemas, list):
849+
pass
850+
elif isinstance(schemas, dict):
851+
schemas = schemas.values()
852+
else:
853+
return res
854+
847855
for extension_element in extension_elements:
848856
for schema in schemas:
849857
inst = extension_element_to_element(extension_element,

0 commit comments

Comments
 (0)