Unverified Commit 066dbba7 authored by Martin Cech's avatar Martin Cech Committed by GitHub
Browse files

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
parents f1b934b6 5ce49867
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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",