Update botmodels: anomaly detection fix
This commit is contained in:
parent
980b1ad0d9
commit
e088a8e69e
1 changed files with 8 additions and 1 deletions
|
|
@ -30,7 +30,14 @@ async def detect_anomalies(
|
|||
|
||||
service = get_anomaly_service()
|
||||
|
||||
values = [float(r.get(request.value_field, 0)) for r in request.data]
|
||||
values = []
|
||||
for r in request.data:
|
||||
val = r.get(request.value_field)
|
||||
if val is not None:
|
||||
try:
|
||||
values.append(float(val))
|
||||
except (TypeError, ValueError):
|
||||
pass
|
||||
|
||||
if not values:
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue