#113: omit claim when empty

This commit is contained in:
Florent Jouatte 2016-08-17 12:13:33 +02:00
parent fc39296610
commit 2c1d582475
2 changed files with 50 additions and 1 deletions

View file

@ -60,8 +60,11 @@ class ScopeClaims(object):
if value is None or value == '':
del aux_dic[key]
elif type(value) is dict:
cleaned_dic = self._clean_dic(value)
if not cleaned_dic:
del aux_dic[key]
continue
aux_dic[key] = self._clean_dic(value)
return aux_dic
@classmethod