Skip to content

Commit c636504

Browse files
committed
no check condition
1 parent 71dce56 commit c636504

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

src/datapilot/core/platforms/dbt/executor.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,16 @@ def _check_if_skipped(self, insight):
101101
def run_llm_checks(self):
102102
llm_checks = get_project_governance_llm_checks(self.token, self.instance_name, self.backend_url)
103103
check_names = [check["name"] for check in llm_checks if check["alias"] not in self.config.get("disabled_insights", [])]
104+
if len(check_names) == 0:
105+
return {"results": []}
106+
104107
llm_check_results = run_project_governance_llm_checks(
105-
self.token, self.instance_name, self.backend_url, self.manifest.json(), self.catalog.json(), check_names
108+
self.token,
109+
self.instance_name,
110+
self.backend_url,
111+
self.manifest.json() if self.manifest else "",
112+
self.catalog.json() if self.catalog else "",
113+
check_names,
106114
)
107115
return llm_check_results
108116

@@ -205,10 +213,12 @@ def run(self):
205213
unique_id=answer["unique_id"],
206214
)
207215
)
208-
for key, value in llm_insights.items():
209-
if key in reports[MODEL]:
210-
reports[MODEL][key].extend(value)
211-
else:
212-
reports[MODEL][key] = value
216+
217+
if llm_insights:
218+
for key, value in llm_insights.items():
219+
if key in reports[MODEL]:
220+
reports[MODEL][key].extend(value)
221+
else:
222+
reports[MODEL][key] = value
213223

214224
return reports

0 commit comments

Comments
 (0)