Spaces:
Running
Running
Update services/state_manager.py
Browse files
services/state_manager.py
CHANGED
@@ -91,7 +91,8 @@ def load_data_from_bubble(url_user_token, org_urn, current_state):
|
|
91 |
for state_key, table_name in data_tables_to_fetch.items():
|
92 |
logging.info(f"Attempting to fetch '{table_name}' from Bubble for org_urn: {org_urn}")
|
93 |
try:
|
94 |
-
fetched_df, error_message = fetch_linkedin_posts_data_from_bubble(constraint_value=org_urn, data_type=table_name, constraint_key="organization_urn", constraint_type="equals")
|
|
|
95 |
if error_message:
|
96 |
logging.warning(f"Error fetching '{table_name}' from Bubble: {error_message}.")
|
97 |
else:
|
|
|
91 |
for state_key, table_name in data_tables_to_fetch.items():
|
92 |
logging.info(f"Attempting to fetch '{table_name}' from Bubble for org_urn: {org_urn}")
|
93 |
try:
|
94 |
+
fetched_df, error_message = fetch_linkedin_posts_data_from_bubble(constraint_value=org_urn, data_type=table_name, constraint_key="organization_urn", constraint_type="equals")
|
95 |
+
new_state[state_key] = pd.DataFrame() if error_message or fetched_df is None else fetched_df
|
96 |
if error_message:
|
97 |
logging.warning(f"Error fetching '{table_name}' from Bubble: {error_message}.")
|
98 |
else:
|