Skip to content

Commit

Permalink
add early check for validity of tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmathis committed Jul 8, 2024
1 parent 257e663 commit f0c70f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions emmet-core/emmet/core/vasp/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def from_tasks(
else structure_optimizations
)

validity_check = [doc for doc in structure_calcs if doc.is_valid]
if not validity_check:
raise ValueError("Group must contain at least one valid task")

# Material ID
possible_mat_ids = [task.task_id for task in structure_optimizations]

Expand Down

0 comments on commit f0c70f4

Please sign in to comment.