From 1ca71f78ed603be5a3089711b43ac044ecc5fee6 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 21 Jun 2023 13:57:25 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E5=8E=BB=E6=8E=89=20rbac=20=E5=BC=95=E8=B5=B7?= =?UTF-8?q?=E7=9A=84=20sql=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jumpserver/middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/jumpserver/middleware.py b/apps/jumpserver/middleware.py index 5ce0616c1..a4738649f 100644 --- a/apps/jumpserver/middleware.py +++ b/apps/jumpserver/middleware.py @@ -110,7 +110,7 @@ class SQLCountMiddleware: def __call__(self, request): from django.db import connection response = self.get_response(request) - response['X-JMS-SQL-COUNT'] = len(connection.queries) + response['X-JMS-SQL-COUNT'] = len(connection.queries) - 2 return response