Skip to content

Commit

Permalink
limit、offset转换成int
Browse files Browse the repository at this point in the history
  • Loading branch information
weideguo committed Jul 3, 2023
1 parent ba7daf6 commit d69be45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sql/slowlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def slowquery_review(request):
start_time = request.POST.get("StartTime")
end_time = request.POST.get("EndTime")
db_name = request.POST.get("db_name")
limit = request.POST.get("limit")
offset = request.POST.get("offset")
limit = int(request.POST.get("limit"))
offset = int(request.POST.get("offset"))
# 服务端权限校验
try:
user_instances(request.user, db_type=["mysql"]).get(instance_name=instance_name)
Expand Down Expand Up @@ -118,8 +118,8 @@ def slowquery_review_history(request):
end_time = request.POST.get("EndTime")
db_name = request.POST.get("db_name")
sql_id = request.POST.get("SQLId")
limit = request.POST.get("limit")
offset = request.POST.get("offset")
limit = int(request.POST.get("limit"))
offset = int(request.POST.get("offset"))
# 服务端权限校验
try:
user_instances(request.user, db_type=["mysql"]).get(instance_name=instance_name)
Expand Down

0 comments on commit d69be45

Please sign in to comment.