Spaces:
Running
Running
Update apis/Bubble_API_Calls.py
Browse files- apis/Bubble_API_Calls.py +2 -2
apis/Bubble_API_Calls.py
CHANGED
@@ -175,7 +175,7 @@ def bulk_upload_to_bubble(data, data_type):
|
|
175 |
# with each JSON object separated by a newline character.
|
176 |
payload = "\n".join(json.dumps(item) for item in data)
|
177 |
|
178 |
-
|
179 |
# print("Payload being sent:\n" + payload) # Uncomment for deep debugging
|
180 |
|
181 |
try:
|
@@ -187,7 +187,7 @@ def bulk_upload_to_bubble(data, data_type):
|
|
187 |
# If the request was successful (200 OK), Bubble returns a JSON array of the new record IDs.
|
188 |
# We parse the JSON response to get this list.
|
189 |
created_ids = response.json()
|
190 |
-
|
191 |
return created_ids
|
192 |
|
193 |
except requests.exceptions.HTTPError as http_err:
|
|
|
175 |
# with each JSON object separated by a newline character.
|
176 |
payload = "\n".join(json.dumps(item) for item in data)
|
177 |
|
178 |
+
logging.info(f"Sending bulk payload to Bubble data type: {data_type}")
|
179 |
# print("Payload being sent:\n" + payload) # Uncomment for deep debugging
|
180 |
|
181 |
try:
|
|
|
187 |
# If the request was successful (200 OK), Bubble returns a JSON array of the new record IDs.
|
188 |
# We parse the JSON response to get this list.
|
189 |
created_ids = response.json()
|
190 |
+
logging.info(f"Successfully uploaded {len(data)} records to {data_type}.")
|
191 |
return created_ids
|
192 |
|
193 |
except requests.exceptions.HTTPError as http_err:
|