Get source guard

This commit is contained in:
WQY\qiong
2023-02-04 14:44:32 +08:00
parent 517c8dd261
commit edc6d423ec

View File

@@ -14,7 +14,9 @@ def get_source_schema(name: str) -> dict[str, dict[str, Any]]:
def get_source(name: str, node: str) -> dict[str, Any]:
s = read(name, f"select * from sources where node = '{node}'")
s = try_read(name, f"select * from sources where node = '{node}'")
if s == None:
return {}
d = {}
d['node'] = str(s['node'])
d['s_type'] = str(s['type'])