Skip to content

Commit

Permalink
Merge pull request #2814 from cbowman0/useSeriesAbove_python3
Browse files Browse the repository at this point in the history
If max(series) returns None then the test with > throws an error
  • Loading branch information
deniszh authored Jul 12, 2023
2 parents dca59dc + b6d9272 commit d39d455
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webapp/graphite/render/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3803,8 +3803,11 @@ def useSeriesAbove(requestContext, seriesList, value, search, replace):

for series in seriesList:
newname = re.sub(search, replace, series.name)
if max(series) > value:
newNames.append(newname)
try:
if max(series) > value:
newNames.append(newname)
except TypeError:
continue

if not newNames:
return []
Expand Down

0 comments on commit d39d455

Please sign in to comment.