Commit 34051323 authored by Leonidas Poulopoulos's avatar Leonidas Poulopoulos
Browse files

Patch that bypasses invalid parsing on institution.xml parses institutions.xml in a way that does not respect the
respective xsd file (institution.xsd). This patch sets the policy_URL
to '-' in case it is not defined by the institution eduroam admins
parent 41f67637
......@@ -1212,10 +1212,17 @@ def instxml(request):
instContactPhone = ET.SubElement(instContact, "phone")
instContactPhone.text =
urltypes = []
for url in inst.url.all():
instUrl = ET.SubElement(instElement, "%s_URL"%(url.urltype))
instUrl.attrib["lang"] = url.lang
instUrl.text = url.url
if 'policy' not in urltypes:
instUrl = ET.SubElement(instElement, "policy_URL")
instUrl.attrib["lang"] = 'en'
instUrl.text = '-'
instTs = ET.SubElement(instElement, "ts")
instTs.text = "%s" %inst.ts.isoformat()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment