Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -47,8 +47,8 @@ def process_and_store_bubble_token(url_user_token, org_urn, token_state):
|
|
47 |
new_state.update({"org_urn": org_urn, "bubble_posts_df": None, "token": new_state.get("token")})
|
48 |
|
49 |
# Determine button properties - default to hidden and non-interactive
|
50 |
-
button_visible =
|
51 |
-
button_interactive =
|
52 |
|
53 |
client_id = os.environ.get("Linkedin_client_id")
|
54 |
if not client_id:
|
@@ -87,10 +87,10 @@ def process_and_store_bubble_token(url_user_token, org_urn, token_state):
|
|
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 =
|
91 |
-
button_interactive =
|
92 |
else:
|
93 |
-
logging.info("ℹ️ No posts found in Bubble for this organization or DataFrame is empty. Sync button will remain
|
94 |
# button_visible and button_interactive remain False
|
95 |
except Exception as e:
|
96 |
logging.error(f"❌ Error fetching posts from Bubble: {e}")
|
|
|
47 |
new_state.update({"org_urn": org_urn, "bubble_posts_df": None, "token": new_state.get("token")})
|
48 |
|
49 |
# Determine button properties - default to hidden and non-interactive
|
50 |
+
button_visible = True
|
51 |
+
button_interactive = True
|
52 |
|
53 |
client_id = os.environ.get("Linkedin_client_id")
|
54 |
if not client_id:
|
|
|
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 = False
|
91 |
+
button_interactive = False
|
92 |
else:
|
93 |
+
logging.info("ℹ️ No posts found in Bubble for this organization or DataFrame is empty. Sync button will remain visible.")
|
94 |
# button_visible and button_interactive remain False
|
95 |
except Exception as e:
|
96 |
logging.error(f"❌ Error fetching posts from Bubble: {e}")
|