Contract: check that additionalBond exists before iterating over it
OrderItems are presented with:
"additionalBonds": null,
Which causes the following error:
return cls(**contract["orderDetail"])
File "/home/mm-proxy/pyenv/versions/3.8.2/envs/somconnexio-mm-proxy/lib/python3.8/site-packages/pymasmovil/models/order_item.py", line 14, in __init__
super().__init__(**kwargs)
File "/home/mm-proxy/pyenv/versions/3.8.2/envs/somconnexio-mm-proxy/lib/python3.8/site-packages/pymasmovil/models/contract.py", line 56, in __init__
for bond in value:
TypeError: 'NoneType' object is not iterable
Edited by Administrator