From 401c711fad7161d555f5145e637069a5b0ffba60 Mon Sep 17 00:00:00 2001 From: Faizaan Gagan Date: Sun, 2 May 2021 23:03:29 +0530 Subject: [PATCH] FIX: removed redundant conditional --- lib/custom_wizard/mapper.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/custom_wizard/mapper.rb b/lib/custom_wizard/mapper.rb index 90ed50b8..7865e8f1 100644 --- a/lib/custom_wizard/mapper.rb +++ b/lib/custom_wizard/mapper.rb @@ -106,12 +106,7 @@ class CustomWizard::Mapper pairs.all? do |pair| connector = pair['connector'] operator = map_operator(connector) - if pair['key_type'] == 'wizard_user' - key = @user.username - else - key = map_field(pair['key'], pair['key_type']) - end - + key = map_field(pair['key'], pair['key_type']) value = cast_value(map_field(pair['value'], pair['value_type']), key, connector) begin validation_result(key, value, operator)