mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2025-12-22 07:54:18 +01:00
(feat) handle empty processed data
This commit is contained in:
@@ -196,8 +196,12 @@ class BackendAPIClient:
|
|||||||
}
|
}
|
||||||
response = requests.post(url, json=payload)
|
response = requests.post(url, json=payload)
|
||||||
backtesting_results = response.json()
|
backtesting_results = response.json()
|
||||||
|
if "processed_data" not in backtesting_results:
|
||||||
|
data = None
|
||||||
|
else:
|
||||||
|
data = pd.DataFrame(backtesting_results["processed_data"])
|
||||||
return {
|
return {
|
||||||
"processed_data": pd.DataFrame(backtesting_results["processed_data"]),
|
"processed_data": data,
|
||||||
"executors": [ExecutorInfo(**executor) for executor in backtesting_results["executors"]],
|
"executors": [ExecutorInfo(**executor) for executor in backtesting_results["executors"]],
|
||||||
"results": backtesting_results["results"]
|
"results": backtesting_results["results"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user