CORD-1465 Fix delete syncstep failing due to no vsg
Change-Id: I8aad1334e875d56c948c32cdede1d5398807603a
diff --git a/xos/synchronizer/steps/sync_vroutertenant.py b/xos/synchronizer/steps/sync_vroutertenant.py
index d8d99a9..fe3fae0 100644
--- a/xos/synchronizer/steps/sync_vroutertenant.py
+++ b/xos/synchronizer/steps/sync_vroutertenant.py
@@ -32,16 +32,16 @@
return None
def fetch_pending(self, deleted):
+ # If fetch_pending is being called for delete, then just execute the standard delete logic.
+ if deleted:
+ return super(SyncVRouterTenant, self).fetch_pending(deleted)
+
fs = FabricService.objects.first()
if (not fs) or (not fs.autoconfig):
return None
# TODO: Why is this a nonstandard synchronizer query?
-
- if (not deleted):
- objs = VRouterTenant.objects.all()
- else:
- objs = super(SyncVRouterTenant, self).fetch_pending(deleted)
+ objs = VRouterTenant.objects.all()
objs = list(objs)