Skip to content

Commit

Permalink
when data is none, better handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmin3 committed Mar 29, 2024
1 parent 0b0ed4b commit f6696b8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ai_ta_backend/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f6696b8

Please sign in to comment.