浏览代码

Refs #31949 -- Simplified @sensitive_variables a bit.

Follow up to 38e391e95fe5258bc6d2467332dc9cd44ce6ba52.
Jon Janzen 1 年之前
父节点
当前提交
6523860ca8
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      django/views/decorators/debug.py

+ 1 - 4
django/views/decorators/debug.py

@@ -39,10 +39,7 @@ def sensitive_variables(*variables):
 
     def decorator(func):
         if iscoroutinefunction(func):
-
-            @wraps(func)
-            async def sensitive_variables_wrapper(*func_args, **func_kwargs):
-                return await func(*func_args, **func_kwargs)
+            sensitive_variables_wrapper = func
 
             wrapped_func = func
             while getattr(wrapped_func, "__wrapped__", None) is not None: