diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index 141c6cb3ce84709d601b0510a61e1c497aa3f598..f50eee6f61e0b0664e0f883feaf6b807e037b0c5 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -97,13 +97,14 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): context_client, request.service_id, rw_copy=False, include_config_rules=True, include_constraints=True, include_endpoint_ids=True) - location_aware = False + gps_location_aware = False for constraint in request.service_constraints: if constraint.WhichOneof('constraint') != 'endpoint_location': continue - location_aware = True + if constraint.endpoint_location.location.WhichOneof('location') != 'gps_position': continue + gps_location_aware = True - LOGGER.debug('location_aware={:s}'.format(str(location_aware))) - if _service is not None and location_aware: + LOGGER.debug('gps_location_aware={:s}'.format(str(gps_location_aware))) + if _service is not None and gps_location_aware: LOGGER.debug(' Removing previous service') tasks_scheduler = TasksScheduler(self.service_handler_factory) tasks_scheduler.compose_from_service(_service, is_delete=True)