Commit 20abb761 by Thibault Grandjean

fix bool object is not subscriptable

parent 50878b74
......@@ -527,7 +527,10 @@ def create_pair(request):
del child["id"]
for field in child.keys():
if field.endswith("_id"):
child[field] = child[field][0]
try:
child[field] = child[field][0]
except TypeError:
child[field] = False
child['is_associated_people'] = True
child['parent_id'] = parent['commercial_partner_id'][0]
# update child base account state
......
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