We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents da39a6b + 1ff9e92 commit 95abfdcCopy full SHA for 95abfdc
src/py/mat3ra/wode/workflows/workflow.py
@@ -90,3 +90,12 @@ def remove_relaxation(self) -> None:
90
existing = self._find_relaxation_subworkflow()
91
if existing is not None:
92
self.remove_subworkflow_by_id(existing.id)
93
+
94
+ def to_dict_without_special_keys(self, special_keys=["context"]) -> Dict[str, Any]:
95
+ workflow_dict = self.to_dict()
96
+ for swf in workflow_dict.get("subworkflows", []):
97
+ for unit in swf.get("units", []):
98
+ for key in special_keys:
99
+ if key in unit:
100
+ unit[key] = {}
101
+ return workflow_dict
0 commit comments