site_map can be bound to multiple things
diff --git a/xos/hpc_observer/steps/sync_sitemap.py b/xos/hpc_observer/steps/sync_sitemap.py
index c81e2ce..e406fc3 100644
--- a/xos/hpc_observer/steps/sync_sitemap.py
+++ b/xos/hpc_observer/steps/sync_sitemap.py
@@ -28,7 +28,15 @@
def filter_hpc_service(self, objs):
hpcService = self.get_hpc_service()
- return [x for x in objs if x.hpcService == hpcService]
+ filtered_objs = []
+ for x in objs:
+ if ((x.hpcService == hpcService) or
+ ((x.serviceProvider != None) and (x.serviceProvider.hpcService == hpcService)) or
+ ((x.contentProvider != None) and (x.contentProvider.serviceProvider.hpcService == hpcService)) or
+ ((x.cdnPrefix!= None) and (x.cdnPrefix.contentProvider.serviceProvider.hpcService == hpcService))):
+ filtered_objs.append(x)
+
+ return filtered_objs
def fetch_pending(self, deleted):
return self.filter_hpc_service(SyncStep.fetch_pending(self, deleted))