@@ -136,11 +136,10 @@ def login_callback(n_clicks, username, password, user_token, lang):
136136
137137from dash import Input , Output , State , callback
138138
139-
140139@callback (
141- Output (" detection_fetch_limit" , " data" ),
142- Input (" detection_fetch_limit_input" , " value" ),
143- prevent_initial_call = True , # optional, remove if you want it to run on first load
140+ Output (' detection_fetch_limit' , ' data' ),
141+ Input (' detection_fetch_limit_input' , ' value' ),
142+ prevent_initial_call = True # optional, remove if you want it to run on first load
144143)
145144def update_fetch_limit (value ):
146145 if value is None :
@@ -223,7 +222,7 @@ def api_cameras_watcher(n_intervals, api_cameras, user_token):
223222 Input ("api_cameras" , "data" ),
224223 Input ("to_acknowledge" , "data" ),
225224 Input ("unmatched_event_id_table" , "data" ),
226- Input ("my-date-picker-single" , "date" ),
225+ Input ("my-date-picker-single" , "date" )
227226 ],
228227 [State ("api_sequences" , "data" ), State ("user_token" , "data" ), State ("event_id_table" , "data" )],
229228 prevent_initial_call = True ,
@@ -300,8 +299,6 @@ def api_watcher(
300299 api_sequences , unmatched_event_table = unmatched_event_id_table
301300 )
302301
303- print ("event_id_table" )
304- print (event_id_table )
305302 local_event_id_table = pd .read_json (StringIO (local_event_id_table ), orient = "split" )
306303
307304 # Load local sequences safely
@@ -320,7 +317,10 @@ def api_watcher(
320317 event_condition = event_id_table .empty or (
321318 "sequences" in local_event_id_table .columns
322319 and "sequences" in event_id_table .columns
323- and np .array_equal (local_event_id_table ["sequences" ].values , event_id_table ["sequences" ].values )
320+ and np .array_equal (
321+ local_event_id_table ["sequences" ].values ,
322+ event_id_table ["sequences" ].values
323+ )
324324 )
325325
326326 # Now apply sequence comparison only if event condition is true
@@ -330,6 +330,8 @@ def api_watcher(
330330 logger .info ("Skipping update: no significant change detected" )
331331 return dash .no_update
332332
333+
334+
333335 return api_sequences .to_json (orient = "split" ), event_id_table .to_json (orient = "split" )
334336
335337 except Exception as e :
0 commit comments