Skip to content

Commit

Permalink
Make unique_extra_keys optional
Browse files Browse the repository at this point in the history
  • Loading branch information
t-reents committed May 24, 2024
1 parent e3d2944 commit c70b418
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aiida_submission_controller/from_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class FromGroupSubmissionController(BaseSubmissionController): # pylint: disabl

dynamic_extra: dict = Field(default_factory=dict)
"""A dictionary of dynamic extras to be added to the extras of the process."""
unique_extra_keys: tuple = Field(default_factory=tuple)
"""List of keys defined in the extras that uniquely define each process to be run."""
parent_group_label: str
"""Label of the parent group from which to construct the process inputs."""
filters: Optional[dict] = None
Expand Down Expand Up @@ -46,7 +44,8 @@ def parent_group(self):
def get_extra_unique_keys(self):
"""Return a tuple of the keys of the unique extras that will be used to uniquely identify your workchains."""
# `_parent_uuid` will be replaced by the `uuid` attribute in the queries
combined_extras = ["_parent_uuid"] + list(self.unique_extra_keys) + list(self._dynamic_extra_keys)
unique_extra_keys = self.unique_extra_keys or []
combined_extras = ["_parent_uuid"] + list(unique_extra_keys) + list(self._dynamic_extra_keys)
return tuple(combined_extras)

def get_parent_node_from_extras(self, extras_values):
Expand Down

0 comments on commit c70b418

Please sign in to comment.