diff --git a/app/controllers/admin/vouchers_controller.rb b/app/controllers/admin/vouchers_controller.rb index 38a4203fd56..01ca689b911 100644 --- a/app/controllers/admin/vouchers_controller.rb +++ b/app/controllers/admin/vouchers_controller.rb @@ -9,6 +9,8 @@ def new end def create + # The use of "safe_constantize" here will trigger a Brakeman error, it can safely be ignored + # as it's a false positive : https://github.com/openfoodfoundation/openfoodnetwork/pull/10821 voucher_type = params[:vouchers_flat_rate][:voucher_type] if Voucher::TYPES.include?(voucher_type) @voucher = voucher_type.safe_constantize.create(