aiidateam / aiida-common-workflows

A repository for the implementation of common workflow interfaces across materials-science codes and plugins
https://aiida-common-workflows.readthedocs.io
MIT License
52 stars 31 forks source link

`EquationOfStateWorkChain`: fix `reference_workchain` use #245

Closed mbercx closed 3 years ago

mbercx commented 3 years ago

Fixes #244

In the current implementation, the reference_workchain is always passed to the get_builder() method of the input generator in the get_sub_workchain_builder() method. However, in case the reference_workchain is None, this leads to an error with the new input generator specification based on the spec/ports.

Here we change the get_sub_workchain_builder() method to only pass the reference_workchain to the get_builder() method in case it is not None.