Skip to content

Commit

Permalink
correct code error
Browse files Browse the repository at this point in the history
  • Loading branch information
Grain-Yu committed Nov 9, 2023
1 parent 027b2cc commit b85d169
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sql/slowlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pyecharts.charts import Line
from pyecharts import options as opts
from common.utils.chart_dao import ChartDao
from pymysql import escape_string
import pymysql

from sql.utils.resource_group import user_instances
from common.utils.extend_json_encoder import ExtendJSONEncoder
Expand Down Expand Up @@ -207,7 +207,7 @@ def slowquery_review_history(request):
def report(request):
"""返回慢SQL历史趋势"""
checksum = request.GET.get("checksum")
checksum = pymysql.escape_string(checksum).decode("utf-8")
checksum = pymysql.escape_string(checksum)
cnt_data = ChartDao().slow_query_review_history_by_cnt(checksum)
pct_data = ChartDao().slow_query_review_history_by_pct_95_time(checksum)
cnt_x_data = [row[1] for row in cnt_data["rows"]]
Expand Down

0 comments on commit b85d169

Please sign in to comment.