diff options
Diffstat (limited to 'opendc/api/v1/paths/pathId')
| -rw-r--r-- | opendc/api/v1/paths/pathId/branches/endpoint.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/opendc/api/v1/paths/pathId/branches/endpoint.py b/opendc/api/v1/paths/pathId/branches/endpoint.py index 1f330472..13638ffa 100644 --- a/opendc/api/v1/paths/pathId/branches/endpoint.py +++ b/opendc/api/v1/paths/pathId/branches/endpoint.py @@ -111,6 +111,9 @@ def POST(request): old_room.datacenter_id = path_parameters['datacenterId'] + if old_room.topology_id is None: + old_room.topology_id = old_room.id + message = old_room.generate_api_call(path_parameters, request.token) response = Request(message).process() @@ -124,6 +127,9 @@ def POST(request): old_tile.room_id = path_parameters['roomId'] + if old_tile.topology_id is None: + old_tile.topology_id = old_tile.id + message = old_tile.generate_api_call(path_parameters, request.token) response = Request(message).process() @@ -137,6 +143,9 @@ def POST(request): old_rack = Rack.query('id', old_objects[0].id)[0] + if old_rack.topology_id is None: + old_rack.topology_id = old_rack.id + message = old_rack.generate_api_call(path_parameters, request.token) response = Request(message).process() @@ -150,6 +159,9 @@ def POST(request): old_machine.read() old_machine.rack_id = path_parameters['rackId'] + if old_machine.topology_id is None: + old_machine.topology_id = old_machine.id + message = old_machine.generate_api_call(path_parameters, request.token) response = Request(message).process() |
