safer extraction of data from the in-memory object
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 19 Aug 2007 13:52:25 +0000 (13:52 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Sun, 19 Aug 2007 13:52:25 +0000 (13:52 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1084 9efc2488-bf62-4759-914b-345cdb29e865

src/python/osrf/json.py

index 98746e6..a0856bd 100644 (file)
@@ -13,7 +13,7 @@ class osrfJSONNetworkEncoder(simplejson.JSONEncoder):
             if reg.wireProtocol == 'array':
                 d = []
                 for k in reg.keys:
-                    d.append(data[k]
+                    d.append(data.get(k)
                 data = d
 
             return {