More "minor" fix

This commit is contained in:
Trung0246
2023-12-22 00:54:44 -08:00
committed by GitHub
parent ebb68af62d
commit cf860bcd20
+6 -8
View File
@@ -71,16 +71,14 @@ def highway_impl(_prompt, _id, _workflow, _way_in, _query, kwargs):
continue
except StopIteration:
continue
name = elem["name"][1:]
if (
("data", name) in _way_in
# elem["type"] == _way_in[("type", name)] # [TODO] Maybe relax the rule a bit?
) or elem["type"] == "*":
res.append(_way_in[("data", name)])
else:
raise Exception(f"Output \"{name}\" is not defined or is not of type \"{elem['type']}\". Expected \"{_way_in[('type', name)]}\".")
if ("data", name) in _way_in:
if elem["type"] == "*" or elem["type"] == _way_in[("type", name)]:
res.append(_way_in[("data", name)])
else:
raise Exception(f"Output \"{name}\" is not defined or is not of type \"{elem['type']}\". Expected \"{_way_in[('type', name)]}\".")
_way_in[("kind")] = "highway"
_way_in[("id")] = _id