Merge pull request #420 from leifj/xsi-nil-fix

fix for bad xsi:nil on complex attributevalue
This commit is contained in:
Roland Hedberg 2017-05-30 08:58:27 +02:00 committed by GitHub
commit 44d35168fd
1 changed files with 5 additions and 3 deletions

View File

@ -139,10 +139,12 @@ class AttributeValueBase(SamlBase):
if self._extatt:
self.extension_attributes = self._extatt
if not text:
self.extension_attributes = {XSI_NIL: 'true'}
else:
if text:
self.set_text(text)
elif not extension_elements:
self.extension_attributes = {XSI_NIL: 'true'}
elif XSI_TYPE in self.extension_attributes:
del self.extension_attributes[XSI_TYPE]
def __setattr__(self, key, value):
if key == "text":