On an impact_model object where metadata: {'author': None, 'reviewer': None, 'report': None}, we can apply the to_dict method and obtain a dictionnary of the impact_model.
When trying to build an impact_model back from this dictionnary, by applying ImpactModel.from_dict(<my_dict>), we get the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "...Lib\site-packages\apparun\impact_model.py", line 150, in from_dict
metadata=ModelMetadata.from_dict(impact_model["metadata"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\Lib\site-packages\apparun\impact_model.py", line 68, in from_dict
author=LcaPractitioner(**model_metadata["author"]),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: apparun.impact_model.LcaPractitioner() argument after ** must be a mapping, not NoneType
On an
impact_modelobject wheremetadata: {'author': None, 'reviewer': None, 'report': None}, we can apply theto_dictmethod and obtain a dictionnary of the impact_model.When trying to build an impact_model back from this dictionnary, by applying
ImpactModel.from_dict(<my_dict>), we get the following error: