From e9b9a962c6f79989a819e20f0c9416bdbc98a3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 11 Sep 2017 15:44:54 +0200 Subject: [PATCH] [backport] Fix throttling bug --- taiga/base/throttling.py | 2 ++ taiga/users/throttling.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/taiga/base/throttling.py b/taiga/base/throttling.py index 086f9660..e8f60c2f 100644 --- a/taiga/base/throttling.py +++ b/taiga/base/throttling.py @@ -39,6 +39,8 @@ class GlobalThrottlingMixin: } +# If you derive a class from this mixin you have to put this class previously +# to the base throttling class. class ThrottleByActionMixin: throttled_actions = [] diff --git a/taiga/users/throttling.py b/taiga/users/throttling.py index 718283a0..b87ea8da 100644 --- a/taiga/users/throttling.py +++ b/taiga/users/throttling.py @@ -24,6 +24,6 @@ class UserDetailRateThrottle(throttling.GlobalThrottlingMixin, throttling.Thrott throttled_actions = ["by_username", "retrieve"] -class UserUpdateRateThrottle(throttling.UserRateThrottle, throttling.ThrottleByActionMixin): +class UserUpdateRateThrottle(throttling.ThrottleByActionMixin, throttling.UserRateThrottle): scope = "user-update" throttled_actions = ["update", "partial_update"]