From 4f1c15f5693f125aa1420617fb1fcccafaf57349 Mon Sep 17 00:00:00 2001 From: PhilipWafula Date: Mon, 3 May 2021 23:46:30 +0300 Subject: [PATCH] Refactors query function to handle new meta result format. --- apps/cic-ussd/cic_ussd/metadata/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cic-ussd/cic_ussd/metadata/base.py b/apps/cic-ussd/cic_ussd/metadata/base.py index e646d8aa..3db80d43 100644 --- a/apps/cic-ussd/cic_ussd/metadata/base.py +++ b/apps/cic-ussd/cic_ussd/metadata/base.py @@ -120,7 +120,7 @@ class MetadataRequestsHandler(Metadata): data = json.loads(response_data.decode('utf-8')) if result.status_code == 200 and self.cic_type == ':cic.person': person = Person() - deserialized_person = person.deserialize(person_data=json.loads(data)) + deserialized_person = person.deserialize(person_data=data) data = json.dumps(deserialized_person.serialize()) cache_data(self.metadata_pointer, data=data) logg.debug(f'caching: {data} with key: {self.metadata_pointer}')