Skip to content

Commit f27b090

Browse files
committed
Fix DataFrame initialization in error handling for batch data retrieval
1 parent 1cf97a2 commit f27b090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashboard/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def index(request: Request):
4545
)
4646
except Exception as e:
4747
log.error(f"Error getting data for batch {batch_name}: {e}")
48-
df = pd.DataFrame()
48+
df = pd.DataFrame(data=[],columns=['metric_name', 'metric_timestamp', 'metric_value'])
4949
app.state.df_cache[batch_name] = df
5050
else:
5151
df = app.state.df_cache[batch_name]

0 commit comments

Comments
 (0)