Switched sync_sites to new style of deletion
diff --git a/planetstack/openstack_observer/steps/sync_sites.py b/planetstack/openstack_observer/steps/sync_sites.py
index e7c645e..c560a6a 100644
--- a/planetstack/openstack_observer/steps/sync_sites.py
+++ b/planetstack/openstack_observer/steps/sync_sites.py
@@ -4,6 +4,7 @@
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.site import Site
+from observer.steps.sync_site_deployments import *
class SyncSites(OpenStackSyncStep):
provides=[Site]
@@ -14,6 +15,6 @@
def delete_record(self, site):
site_deployments = SiteDeployments.objects.filter(site=site)
- site_deployment_deleter = SiteDeploymentDeleter()
+ site_deployment_deleter = SyncSiteDeployments().delete_record
for site_deployment in site_deployments:
- site_deployment_deleter(site_deployment.id)
+ site_deployment_deleter(site_deployment)