(20241009) 'last decorator' bug-fixed
This commit is contained in:
Binary file not shown.
@@ -346,9 +346,10 @@ def set_api_version(api_version):
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
|
print(kwargs["decorator_count"])
|
||||||
return response
|
return response
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
@@ -404,7 +405,7 @@ def read_input(
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
@@ -543,7 +544,7 @@ def validate_input(
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
@@ -683,7 +684,7 @@ def log_request_to_mongo(
|
|||||||
|
|
||||||
# Return the response from the wrapped function.
|
# Return the response from the wrapped function.
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
@@ -724,7 +725,7 @@ def should_not_be_under_maintenance(attr_name):
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
@@ -771,7 +772,7 @@ def only_whitelisted_ips(attr_name):
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
@@ -879,7 +880,7 @@ def limit_rate(
|
|||||||
|
|
||||||
# Return the response from the function call:
|
# Return the response from the function call:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
@@ -918,7 +919,7 @@ def handle_cancelled_request(cleanup_func = None, cleanup_coro = None):
|
|||||||
|
|
||||||
# Done here:
|
# Done here:
|
||||||
if (
|
if (
|
||||||
kwargs["decorator_count"] == 1 and
|
kwargs["decorator_count"] == 0 and
|
||||||
isinstance(response, ResponseModel)
|
isinstance(response, ResponseModel)
|
||||||
): response = response.for_quart()
|
): response = response.for_quart()
|
||||||
return response
|
return response
|
||||||
|
|||||||
Reference in New Issue
Block a user