fixed issue with node event tests when position is None
This commit is contained in:
parent
8b7d651d06
commit
da203d578e
1 changed files with 7 additions and 1 deletions
|
@ -488,7 +488,13 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
|
|||
:return: node event that contains node id, name, model, position, and services
|
||||
:rtype: core.api.grpc.core_pb2.NodeEvent
|
||||
"""
|
||||
position = core_pb2.Position(x=int(event.x_position), y=int(event.y_position))
|
||||
x = None
|
||||
if event.x_position is not None:
|
||||
x = int(event.x_position)
|
||||
y = None
|
||||
if event.y_position is not None:
|
||||
y = int(event.y_position)
|
||||
position = core_pb2.Position(x=x, y=y)
|
||||
services = event.services or ""
|
||||
services = services.split("|")
|
||||
node_proto = core_pb2.Node(
|
||||
|
|
Loading…
Reference in a new issue