diff --git a/api/s18_sources.py b/api/s18_sources.py index 7730916..1baeab8 100644 --- a/api/s18_sources.py +++ b/api/s18_sources.py @@ -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'])