Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber committed Dec 11, 2023
1 parent 9da5a83 commit 5cf955f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiida_common_workflows/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ def get_code_from_list_or_database(codes, entry_point: str):
:param entry_point: calculation job entry point name.
:return: a ``Code`` instance configured for the given entry point or ``None``.
"""
from aiida.orm import AbstractCode, QueryBuilder
from aiida.orm import InstalledCode, QueryBuilder

for entry in codes:
if entry.default_calc_job_plugin == entry_point:
return entry

result = QueryBuilder().append(AbstractCode, filters={'attributes.default_calc_job_plugin': entry_point}).first()
result = QueryBuilder().append(InstalledCode, filters={'attributes.input_plugin': entry_point}).first()

if result is not None:
return result[0]
Expand Down

0 comments on commit 5cf955f

Please sign in to comment.