Skip to content

Commit

Permalink
Merge pull request #10896 from rabbitmq/tomyouyou-rabbitmq_put_vhost
Browse files Browse the repository at this point in the history
Be more defensive when importing definitions where some virtual hosts do not have a default queue type
  • Loading branch information
michaelklishin authored Apr 2, 2024
2 parents dd5686a + fb05a51 commit e4da70d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deps/rabbit/src/rabbit_vhost.erl
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,18 @@ put_vhost(Name, Description, Tags0, Trace, Username) ->
boolean(),
rabbit_types:username()) ->
'ok' | {'error', any()} | {'EXIT', any()}.
put_vhost(Name, Description, Tags0, DefaultQueueType, Trace, Username) ->
put_vhost(Name, Description, Tags0, DefaultQueueType0, Trace, Username) ->
Tags = case Tags0 of
undefined -> <<"">>;
null -> <<"">>;
"undefined" -> <<"">>;
"null" -> <<"">>;
Other -> Other
end,
DefaultQueueType = case DefaultQueueType0 of
<<"undefined">> -> undefined;
_ -> DefaultQueueType0
end,
ParsedTags = parse_tags(Tags),
rabbit_log:debug("Parsed tags ~tp to ~tp", [Tags, ParsedTags]),
Result = case exists(Name) of
Expand Down

0 comments on commit e4da70d

Please sign in to comment.