Skip to content

Commit be84015

Browse files
committed
Merge pull request #122 from alanquillin/FixServerAddressErrorWhenPublicOrPrivateIsMissing
Fixed an issue with the Server Address which threw an exception when either public or private address was missing
2 parents cc69a6e + d057fb0 commit be84015

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/corelib/Core/Domain/ServerAddresses.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ namespace net.openstack.Core.Domain
77
public class ServerAddresses : Dictionary<string, AddressDetails[]>
88
{
99
[IgnoreDataMember]
10-
public AddressDetails[] Private { get { return this["private"]; } }
10+
public AddressDetails[] Private { get { return ContainsKey("private") ? this["private"] : null; } }
1111

1212
[IgnoreDataMember]
13-
public AddressDetails[] Public { get { return this["public"]; } }
13+
public AddressDetails[] Public { get { return ContainsKey("public") ? this["public"] : null; } }
1414
}
1515
}

0 commit comments

Comments
 (0)