Allow restoring a null objectId by passing None to restore

This commit is contained in:
Jason Paryani
2014-04-09 17:06:34 -07:00
parent cba4378d1f
commit ba4e5e46cb
3 changed files with 23 additions and 6 deletions

View File

@@ -1856,7 +1856,9 @@ cdef class TwoPartyClient:
cdef _DynamicObjectBuilder object_builder
cdef _DynamicObjectReader object_reader
if type(objectId) is _DynamicObjectBuilder:
if objectId is None:
return _CapabilityClient()._init(helpers.restoreHelper(deref(self.thisptr)), self)
elif type(objectId) is _DynamicObjectBuilder:
object_builder = objectId
return _CapabilityClient()._init(helpers.restoreHelper(deref(self.thisptr), deref(object_builder.thisptr)), self)
elif type(objectId) is _DynamicObjectReader: