diff --git a/app/models/concerns/user_defined_fields/fieldable.rb b/app/models/concerns/user_defined_fields/fieldable.rb index f95279c..8e1e58e 100644 --- a/app/models/concerns/user_defined_fields/fieldable.rb +++ b/app/models/concerns/user_defined_fields/fieldable.rb @@ -43,8 +43,7 @@ def validate_user_defined_fields next unless field.required? # Parse the user defined field and extract the value - json = JSON.parse(self.user_defined || '{}') - value = json[field.column_name] + value = self.user_defined[field.column_name] if self.user_defined.present? # Add an error if the value is "empty" next unless value.nil? ||