Commit 3e2d5310 by Félicie

fix error

parent 66e5be54
Pipeline #2116 passed with stage
in 1 minute 44 seconds
...@@ -556,10 +556,9 @@ def get_member_info(request, id): ...@@ -556,10 +556,9 @@ def get_member_info(request, id):
member = member[0] member = member[0]
parent = None parent = None
if member['parent_id']: if member['parent_id']:
parent_barcode_base = api.search_read('res.partner', [['id', '=', int(member['parent_id'][0])]], ['barcode_base'])[0] parent = api.search_read('res.partner', [['id', '=', int(member['parent_id'][0])]], ['barcode_base', 'email'])[0]
member['parent_barcode_base'] = parent_barcode_base['barcode_base'] member['parent_barcode_base'] = parent['barcode_base']
parent_email = api.search_read('res.partner', [['id', '=', int(member['parent_id'][0])]], ['email'])[0] member['parent_email'] = parent['email']
member['parent_email'] = parent_email['email']
res['member'] = member res['member'] = member
response = JsonResponse(res) response = JsonResponse(res)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment