diff --git a/src/aiida_quantumespresso/workflows/pdos.py b/src/aiida_quantumespresso/workflows/pdos.py index beb23b6f6..435a208dc 100644 --- a/src/aiida_quantumespresso/workflows/pdos.py +++ b/src/aiida_quantumespresso/workflows/pdos.py @@ -167,7 +167,7 @@ def validate_energy_range_vs_fermi(value, _): """ if len(value) != 2: return f'`energy_range_vs_fermi` should be a `List` of length two, but got: {value}' - if not all(isinstance(val, float) for val in value): + if not all(isinstance(val, (float, int)) for val in value): return f'`energy_range_vs_fermi` should be a `List` of floats, but got: {value}' diff --git a/tests/conftest.py b/tests/conftest.py index e0b08b57e..3809e8032 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -807,7 +807,7 @@ def generate_workchain_pdos(generate_workchain, generate_inputs_pw, fixture_code """Generate an instance of a `PdosWorkChain`.""" def _generate_workchain_pdos(): - from aiida.orm import Bool, Dict + from aiida.orm import Bool, Dict, List from aiida_quantumespresso.utils.resources import get_default_options @@ -855,7 +855,7 @@ def _generate_workchain_pdos(): 'nscf': nscf, 'dos': dos, 'projwfc': projwfc, - 'align_to_fermi': Bool(True), + 'energy_range_vs_fermi': List([-10, 10]), 'dry_run': Bool(True) }