diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py
index cdb4f76604153fdc605b5cf18cbf43d6ba98571e..4876d83f6662e7f5072ab42849261e8ceea4471d 100644
--- a/src/service/service/ServiceServiceServicerImpl.py
+++ b/src/service/service/ServiceServiceServicerImpl.py
@@ -131,8 +131,8 @@ class ServiceServiceServicerImpl(ServiceServiceServicer):
             constraint.endpoint_location.endpoint_id.CopyFrom(closer_endpoint_id)
 
             service_endpoint_ids = [
-                endpoint.endpoint_id.endpoint_uuid
-                for endpoint in service.service_endpoint_ids
+                endpoint_id.endpoint_uuid
+                for endpoint_id in service.service_endpoint_ids
             ]
             if closer_endpoint_id not in service_endpoint_ids:
                 service.service_endpoint_ids.append(closer_endpoint_id)