Do not block computation if M=0
When a request is blocked and its M value is set to 0. This should not raise
an error in pth_assign_spectrum. This test verify that the function
does not raise an error.
@@ -162,6 +162,10 @@ class Result_element(Element):
}
pro_list.append(temp)
index += 1
+ elif self.path_request.M == 0 and hasattr(self.path_request, 'blocking_reason'):
+ # if the path is blocked due to spectrum, no label object is created, but
+ # the json response includes a detailed path for user infromation.
+ pass
else:
raise ServiceError('request {self.path_id} should have positive path bandwidth value.')
if isinstance(element, Transceiver):
