Skip to content

Commit 7acd1cb

Browse files
committed
store extra md as a dict
1 parent bfc21ca commit 7acd1cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pyff/samlmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ def discojson_sp(e, global_trust_info=None, global_md_sources=None):
961961

962962
md_sources = e.findall("{%s}SPSSODescriptor/{%s}Extensions/{%s}TrustInfo/{%s}MetadataSource" % (NS['md'], NS['md'], NS['ti'], NS['ti']))
963963

964-
sp['extra_md'] = []
964+
sp['extra_md'] = {}
965965
for md_source in md_sources:
966966
dname_external = {}
967967
for dname in md_source.iterfind('.//{%s}DisplayName' % NS['ti']):
@@ -971,7 +971,7 @@ def discojson_sp(e, global_trust_info=None, global_md_sources=None):
971971
for idp in md_source.findall("{%s}EntityDescriptor" % NS['md']):
972972
idp_json = discojson(idp)
973973
idp_json['trusted'] = dname_external
974-
sp['extra_md'].append(idp_json)
974+
sp['extra_md'][idp_json['entityID']] = idp_json
975975

976976
sp['profiles'] = {}
977977
# Grab trust profile emements, and translate to json

0 commit comments

Comments
 (0)