Skip to content

Commit

Permalink
Bugfix has_atomistic.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikibonacci committed Nov 22, 2024
1 parent 21897d9 commit b9d739c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/aiida/orm/nodes/data/array/kpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def set_cell_from_structure(self, structuredata):
'An instance of StructureData or aiida-atomistic StructureData should be passed to '
'the KpointsData, found instead {}'.format(structuredata.__class__)
)
if has_atomistic:
if has_atomistic():
from aiida_atomistic import StructureData as AtomisticStructureData

Check warning on line 234 in src/aiida/orm/nodes/data/array/kpoints.py

View check run for this annotation

Codecov / codecov/patch

src/aiida/orm/nodes/data/array/kpoints.py#L233-L234

Added lines #L233 - L234 were not covered by tests

if not isinstance(structuredata, AtomisticStructureData):
Expand Down
2 changes: 1 addition & 1 deletion src/aiida/orm/nodes/data/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ def to_atomistic(self):
"""
Returns the atomistic StructureData version of the orm.StructureData one.
"""
if not has_atomistic:
if not has_atomistic():
raise ImportError(

Check warning on line 1893 in src/aiida/orm/nodes/data/structure.py

View check run for this annotation

Codecov / codecov/patch

src/aiida/orm/nodes/data/structure.py#L1892-L1893

Added lines #L1892 - L1893 were not covered by tests
'aiida-atomistic plugin is not installed, \
please install it to have full support for atomistic structures'
Expand Down

0 comments on commit b9d739c

Please sign in to comment.