diff --git a/ai_ta_backend/flows.py b/ai_ta_backend/flows.py index 1f1b42b5..aa436b38 100644 --- a/ai_ta_backend/flows.py +++ b/ai_ta_backend/flows.py @@ -166,10 +166,13 @@ def main_flow(self, name: str, api_key: str = "", data: str = ""): hook = self.url + f"/webhook/{hookId}" print("Hook!!!: ", hook) print(data) - json_data = json.loads(data) - print("Data to json") - new_data = dict(json_data) - print("Got data to dictionary") + if data: + json_data = json.loads(data) + print("Data to json") + new_data = dict(json_data) + print("Got data to dictionary") + else: + new_data = None response = self.supabase_client.table('n8n_api_keys').select("*").execute() print("Got response")