Skip to content

Commit

Permalink
fix(functions): Ensure functions timeseries is non empty (#53462)
Browse files Browse the repository at this point in the history
It's possible that the timeseries is an empty array which will error
when we try to use the first 20% as historical data. Make sure to handle
this.

Fixes SENTRY-1402
  • Loading branch information
Zylphrex committed Jul 24, 2023
1 parent 4a2bbbc commit 5cf7648
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def get_trends_data(stats_data):
"request_end": v[data["function"]]["end"],
}
for k, v in stats_data.items()
if v[data["function"]]["data"]
},
"sort": data["trend"].as_sort(),
"trendFunction": data["function"],
Expand Down

0 comments on commit 5cf7648

Please sign in to comment.