File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,25 @@ def api_watcher(
328328 logger .info ("Skipping update: no significant change detected" )
329329 return dash .no_update
330330
331- return api_sequences .to_json (orient = "split" ), event_id_table .to_json (orient = "split" )
331+ # Compare new and old event_id_table before returning
332+ new_event_id_table_json = (
333+ event_id_table .to_json (orient = "split" )
334+ if not event_id_table .empty
335+ else pd .DataFrame ().to_json (orient = "split" )
336+ )
337+
338+ print (event_id_table )
339+
340+ old_event_id_table_json = (
341+ local_event_id_table .to_json (orient = "split" ) if not local_event_id_table .empty else None
342+ )
343+
344+ if new_event_id_table_json == old_event_id_table_json :
345+ # Only api_sequences changed, keep event_id_table untouched
346+ return api_sequences .to_json (orient = "split" ), dash .no_update
347+ else :
348+ # Both changed, update both
349+ return api_sequences .to_json (orient = "split" ), new_event_id_table_json
332350
333351 except Exception as e :
334352 logger .error (f"Failed to fetch sequences: { e } " )
You can’t perform that action at this time.
0 commit comments