From af076fed107321da6fe875d89ff631d0472b53d3 Mon Sep 17 00:00:00 2001 From: Clemens Hoffmann Date: Mon, 25 Nov 2024 17:01:39 +0100 Subject: [PATCH] Fix style --- app/messages/validators.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/messages/validators.rb b/app/messages/validators.rb index c339683f71c..d4f4d511e8b 100644 --- a/app/messages/validators.rb +++ b/app/messages/validators.rb @@ -242,12 +242,9 @@ def validate(record) class OptionsValidator < ActiveModel::Validator def validate(record) - if record.options.blank? # Route Creation with explicit 'null' options is not allowed - if record.is_a?(VCAP::CloudController::RouteCreateMessage) && record.options.nil? - record.errors.add(:options, message: 'is not a valid object') - end + record.errors.add(:options, message: 'is not a valid object') if record.is_a?(VCAP::CloudController::RouteCreateMessage) && record.options.nil? return end