GuglielmoTor commited on
Commit
f7e8fb4
·
verified ·
1 Parent(s): 3fb0aa4

Update services/state_manager.py

Browse files
Files changed (1) hide show
  1. services/state_manager.py +2 -2
services/state_manager.py CHANGED
@@ -163,13 +163,13 @@ def process_and_store_bubble_token(url_user_token, org_urn, token_state):
163
 
164
  if not quarter_data.empty:
165
  latest_quarter_analysis = quarter_data.sort_values(by='Created Date', ascending=False).iloc[0]
166
- should_run_due_to_no_data = pd.isna(latest_quarter_analysis)
167
  else:
168
  should_run_due_to_no_data = True # No quarter data found
169
  else:
170
  should_run_due_to_no_data = True # No data at all
171
 
172
- if should_run_due_to_no_data.any():
173
  logging.info(f"No existing agentic analysis data found for org {current_org_urn}. Triggering run.")
174
  new_state["agentic_pipeline_should_run_now"] = True
175
  else:
 
163
 
164
  if not quarter_data.empty:
165
  latest_quarter_analysis = quarter_data.sort_values(by='Created Date', ascending=False).iloc[0]
166
+ should_run_due_to_no_data = pd.isna(latest_quarter_analysis).any()
167
  else:
168
  should_run_due_to_no_data = True # No quarter data found
169
  else:
170
  should_run_due_to_no_data = True # No data at all
171
 
172
+ if should_run_due_to_no_data:
173
  logging.info(f"No existing agentic analysis data found for org {current_org_urn}. Triggering run.")
174
  new_state["agentic_pipeline_should_run_now"] = True
175
  else: