Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmaen committed Nov 25, 2024
1 parent 088070a commit af076fe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/messages/validators.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit af076fe

Please sign in to comment.