Get source guard
This commit is contained in:
@@ -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]:
|
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 = {}
|
||||||
d['node'] = str(s['node'])
|
d['node'] = str(s['node'])
|
||||||
d['s_type'] = str(s['type'])
|
d['s_type'] = str(s['type'])
|
||||||
|
|||||||
Reference in New Issue
Block a user