def _pw_recover_from_json(self, data): info = json.loads(data)['profile'][0] ret = Profile() if 'validid' in info: ret.validid = info['validid'] if 'recover_contacts' in info: ret.recover_contacts = info['recover_contacts'] if 'recover_block_reasons' in info: ret.recover_block_reasons = info['recover_block_reasons'] return ret
def _pw_recover_from_json(self, data): info = json.loads(data)['profile'][0] ret = Profile() if 'validid' in info: ret.validid = info['validid'] if 'recover_email' in info: ret.recover_email = info['recover_email'] if 'recover_email_date' in info: ret.recover_email_date = info['recover_email_date'] if 'recover_sms' in info: ret.recover_sms = info['recover_sms'] if 'recover_sms_date' in info: ret.recover_sms_date = info['recover_sms_date'] if 'recover_block_code' in info: ret.recover_block_code = info['recover_block_code'] return ret