From 07cae43484911ddf87b87d7d3399f7b09378f8fe Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 5 Sep 2012 14:35:44 +0200 Subject: Fixed metadata serialization of Numbers and DNs There were following problems: 1. DNs and Decimals weren't properly serialized. Serialization output was object with empty __base64__ attribute. It was fixed by converting them to string. 2. numberical values equal to 0 were excluded from metadata. It broke many of minvalue checks in Web UI. Now excluding only None and False values as initally intended. https://fedorahosted.org/freeipa/ticket/3052 --- ipalib/plugins/baseldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/plugins/baseldap.py') diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index 3dcb2d39..6a054ffd 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -628,7 +628,7 @@ class LDAPObject(Object): def __json__(self): ldap = self.backend json_dict = dict( - (a, getattr(self, a)) for a in self.json_friendly_attributes + (a, json_serialize(getattr(self, a))) for a in self.json_friendly_attributes ) if self.primary_key: json_dict['primary_key'] = self.primary_key.name -- cgit