Skip to content

Commit 0866a36

Browse files
committed
Fix route options update behavior
1 parent affd6ec commit 0866a36

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/actions/route_update.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ module VCAP::CloudController
22
class RouteUpdate
33
def update(route:, message:)
44
Route.db.transaction do
5-
route.options = message.options if message.requested?(:options)
5+
if message.requested?(:options)
6+
route.options = if message.options.nil?
7+
nil
8+
elsif route.options.nil?
9+
message.options
10+
else
11+
route.options.merge(message.options)
12+
end
13+
end
614
route.save
715
MetadataUpdate.update(route, message)
816
end

0 commit comments

Comments
 (0)