Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -82,11 +82,11 @@ def process_and_store_bubble_token(url_user_token, org_urn, token_state):
|
|
82 |
try:
|
83 |
# Assuming fetch_posts_from_bubble returns a Pandas DataFrame or None
|
84 |
bubble_posts_df, error_message = fetch_posts_from_bubble(current_org_urn)
|
85 |
-
new_state["bubble_posts_df"] =
|
86 |
-
logging.info(f"df {len(
|
87 |
|
88 |
-
if
|
89 |
-
logging.info(f"✅ Successfully fetched {len(
|
90 |
button_visible = True
|
91 |
button_interactive = True
|
92 |
else:
|
|
|
82 |
try:
|
83 |
# Assuming fetch_posts_from_bubble returns a Pandas DataFrame or None
|
84 |
bubble_posts_df, error_message = fetch_posts_from_bubble(current_org_urn)
|
85 |
+
new_state["bubble_posts_df"] = bubble_posts_df # Store DataFrame in state
|
86 |
+
logging.info(f"df {len(bubble_posts_df)}")
|
87 |
|
88 |
+
if bubble_posts_df is not None and not new_state["bubble_posts_df"].empty:
|
89 |
+
logging.info(f"✅ Successfully fetched {len(bubble_posts_df)} posts from Bubble. Sync button will be enabled.")
|
90 |
button_visible = True
|
91 |
button_interactive = True
|
92 |
else:
|