fix: follow up pr-15343 (#15355)

This commit is contained in:
Yongjie Zhao 2021-06-24 09:38:25 +01:00 committed by GitHub
parent fae4531f1e
commit b3616d23a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1236,7 +1236,7 @@ class NVD3TimeSeriesViz(NVD3Viz):
sort_by_label = utils.get_metric_name(sort_by)
if sort_by_label not in utils.get_metric_names(d["metrics"]):
d["metrics"].append(sort_by)
d["orderby"] = [(sort_by, not self.form_data.get("order_desc", is_asc))]
d["orderby"] = [(sort_by, is_asc)]
return d
def to_series(