GreenDelta / olca-ipc.py

Mozilla Public License 2.0
29 stars 17 forks source link

Fix UpstreamTree impact_category bug #33

Closed mikethemerry closed 5 months ago

mikethemerry commented 6 months ago

Previously using the following would break due to the if self._envi_flow is None check with an unset self._envi_flow

The logic was correct, but is None throws an error if the value is not set.

To fix this with least disruption to the rest of the code, all of the optional variables were given None default values at init and all checks then succeed.

I have not implemented tests as there is not a default impact category to use in the testing framework, however this has been tested locally.

msrocka commented 5 months ago

thank you!