Merge pull request #18011 from mvdbeek/avoid_apply_rules_exception_when_no_collection_in_history

[24.0] Avoid exception when opening apply rules tool and no collection in history
This commit is contained in:
Martin Cech
2024-04-17 19:32:48 +02:00
committed by GitHub
+1 -2
View File
@@ -2646,8 +2646,7 @@ class RulesListToolParameter(BaseJsonToolParameter):
def to_dict(self, trans, other_values=None):
other_values = other_values or {}
d = ToolParameter.to_dict(self, trans)
if (target_name := self.data_ref) in other_values:
target = other_values[target_name]
if target := other_values.get(self.data_ref):
if not is_runtime_value(target):
d["target"] = {
"src": "hdca" if hasattr(target, "collection") else "hda",