Skip to content

Commit

Permalink
Merge pull request #1124 from mkhorton/patch-2
Browse files Browse the repository at this point in the history
Fix for MaterialsBuilder when `TaskDoc.tags` is `None`
  • Loading branch information
tsmathis authored Oct 10, 2024
2 parents 6c3fef0 + e4f95ed commit 8fe5e2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emmet-builders/emmet/builders/vasp/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@ def process_item(self, items: List[Dict]) -> List[Dict]:
grouped_tasks = self.filter_and_group_tasks(tasks, task_transformations)
materials = []
for group in grouped_tasks:
# commercial_license == True means that the default CC-BY license is applied
# commercial_license == False means that a CC-BY-NC license is applied
commercial_license = True
for task_doc in group:
if set(task_doc.tags).intersection(
if task_doc.tags and set(task_doc.tags).intersection(
set(self.settings.NON_COMMERCIAL_TAGS)
):
commercial_license = False
Expand Down

0 comments on commit 8fe5e2b

Please sign in to comment.