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

View file

@ -18,6 +18,7 @@ require 'capybara/minitest'
require 'webmock/minitest'
require 'support/assertions/epp_assertions'
require 'sidekiq/testing'
require 'spy/integration'
Sidekiq::Testing.fake!