Fix throttling condition

This commit is contained in:
Alex Sherman 2021-11-27 16:59:00 +05:00 committed by olegphenomenon
parent f17ef17d16
commit 16d4e4b4e6
2 changed files with 2 additions and 1 deletions

View file

@ -14,7 +14,7 @@ module Shunter
around_action :throttle, only: actions
def throttle
unless throttled_user.present? && Shunter.feature_enabled?
if throttled_user.blank? || !Shunter.feature_enabled?
yield if block_given?
return
end