Skip to content

Commit

Permalink
API-41893 Separation Location Code validation fix (#19377)
Browse files Browse the repository at this point in the history
* Fix type for comparison, reference correct field in error

* Update schema to ref BRD for separationLocationCode, add generated swagger

* Revert schema & swagger changes intended for another branch
  • Loading branch information
mchristiansonVA authored Nov 12, 2024
1 parent afa2fd3 commit 9899578
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ def validate_form_526_location_codes!
form_attributes['serviceInformation']['servicePeriods'].each do |service_period|
next if Date.parse(service_period['activeDutyEndDate']) <= Time.zone.today
next if separation_locations.any? do |location|
location[:id] == service_period['separationLocationCode']
location[:id]&.to_s == service_period['separationLocationCode']
end

raise ::Common::Exceptions::InvalidFieldValue.new('separationLocationCode',
form_attributes['separationLocationCode'])
service_period['separationLocationCode'])
end
end

Expand Down

0 comments on commit 9899578

Please sign in to comment.