Skip to content

Commit d057fb0

Browse files
author
Alan Quillin
committed
Fixed an issue with the Server Address which threw an exception when either public or private address was missing
1 parent cc69a6e commit d057fb0

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)