diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-09-11 14:31:13 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-09-13 16:47:00 +0200 |
commit | 1aea8bd18e514446133d0c89e515676e74b861af (patch) | |
tree | 40339c50468f259db0fa3d35f58c9b60db03bd6f | |
parent | f6fed3c54742bbfcc4d8bb6433c5965ca61fd989 (diff) | |
download | freeipa-1aea8bd18e514446133d0c89e515676e74b861af.tar.gz freeipa-1aea8bd18e514446133d0c89e515676e74b861af.tar.xz freeipa-1aea8bd18e514446133d0c89e515676e74b861af.zip |
JSON serialization of long type
Numbers of long type were incorrectly serialized to JSON as empty strings when using json_serialize function. It caused problem in serialization of metadata for Web UI. This patch is fixing it.
Discovered after "Cast DNS SOA serial maximum boundary to long"
-rw-r--r-- | ipalib/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipalib/util.py b/ipalib/util.py index ca71e78db..1d5900924 100644 --- a/ipalib/util.py +++ b/ipalib/util.py @@ -43,7 +43,7 @@ def json_serialize(obj): return [json_serialize(o) for o in obj] if isinstance(obj, dict): return dict((k, json_serialize(v)) for (k, v) in obj.iteritems()) - if isinstance(obj, (bool, float, int, unicode, NoneType)): + if isinstance(obj, (bool, float, int, long, unicode, NoneType)): return obj if isinstance(obj, str): return obj.decode('utf-8') |