From 23cfebc20dad76084a991b83be8362fbd0632d3e Mon Sep 17 00:00:00 2001 From: khushal Date: Wed, 9 Oct 2024 10:25:36 +0530 Subject: [PATCH] (20241009) 'last decorator' bug-fixed --- .../__pycache__/async_quart.cpython-310.pyc | Bin 22943 -> 22964 bytes utils_v2/api/async_quart.py | 17 +++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/utils_v2/api/__pycache__/async_quart.cpython-310.pyc b/utils_v2/api/__pycache__/async_quart.cpython-310.pyc index d0c6850ad6b20a749024265744fa07517e55a39a..b773a45f024105c14b549ac49456a2947bb2eccd 100644 GIT binary patch delta 1935 zcmaJ?Z%kWN6z_d~E#*&JSjt8z1q&?L0RuAmYq!D*Muio+6^4c33-6s1Z>OPoaA`2g;Aq$_TW+3vG%rQ3;C>jj(RoT_g+$v`!*XK@vup6&22l z7ZfK1Nfjl%#Hbi0L;($Xl|&5#c?D`&6{h|myq;&z&0&nfh(Xkd24yD6BpITH2#+*E z27$YIcEb?crbijf5*m)bhG2);LN-IExhnlQZtD?VhAHz_(L|#P_`+q1t(aGpM1ZT7 zn`8o_g)^E#=44gUAt))TP$6LyUM%W)VwhR80zHKkrxA`JWFa8;F<33C&gL83C6Vt8 zSc(n$0isY0ip)``7q`;!Sab1`nx)m2R*{onFWs%4M5ZYiE4@i1=qfABiLeE$TGsV? zC9h}58}KtDM47J1GB4M)0Kb*pui&~=^c@U8hj1R@0>Zlp$uh4&>h}6pzLD_bVVoeL zdIn>$I$8HPx6k7bh9lCYjY16BVwhfxjc+%ybAT%~F7*V)jKNgm~YP4KloSj0(vL*UGq8)+|r(k;*XiDtUl=T_WCHT z#1B=#f7mb4d&t3O@Bx^dt?Xv^I}6A?7;{$TU1fXUKVpxyATBvERG-4KvzshJd3$8b zb)-`c`XoMpth~+0DZzZZqZ->SYY&7XLCHt)Zbp2(`xMxQHC5i^4Fp0*J^ntAZ}@;O zEcru0dJC#La?9@{2|t`~(V9Y7N8pN+n`MLHj@Nea1Jh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*W=eJP3=l1vln!h7T5w9bDK>UpO4Y3<>guyU} zbgBk?)Pl#_y`f%JmHmp&#wBE!`&6H*hv>`bjYXl!h!Vs`L=EB(#12F&VhvmUY46u8wxNf|WnrGEqLPwEK( diff --git a/utils_v2/api/async_quart.py b/utils_v2/api/async_quart.py index ab2ff39..99ae4ea 100644 --- a/utils_v2/api/async_quart.py +++ b/utils_v2/api/async_quart.py @@ -346,9 +346,10 @@ def set_api_version(api_version): # Done here: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() + print(kwargs["decorator_count"]) return response return wrapper @@ -404,7 +405,7 @@ def read_input( # Done here: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response @@ -543,7 +544,7 @@ def validate_input( # Done here: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response @@ -683,7 +684,7 @@ def log_request_to_mongo( # Return the response from the wrapped function. if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response @@ -724,7 +725,7 @@ def should_not_be_under_maintenance(attr_name): # Done here: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response @@ -771,7 +772,7 @@ def only_whitelisted_ips(attr_name): # Done here: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response @@ -879,7 +880,7 @@ def limit_rate( # Return the response from the function call: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response @@ -918,7 +919,7 @@ def handle_cancelled_request(cleanup_func = None, cleanup_coro = None): # Done here: if ( - kwargs["decorator_count"] == 1 and + kwargs["decorator_count"] == 0 and isinstance(response, ResponseModel) ): response = response.for_quart() return response