diff --git a/changes/634.fixed b/changes/634.fixed new file mode 100644 index 00000000..363c0cd7 --- /dev/null +++ b/changes/634.fixed @@ -0,0 +1 @@ +Fixed load locations on the source adapter for the ServiceNow integration when a site filter is applied. \ No newline at end of file diff --git a/nautobot_ssot/integrations/servicenow/diffsync/adapter_nautobot.py b/nautobot_ssot/integrations/servicenow/diffsync/adapter_nautobot.py index c2bc4680..f6b95606 100644 --- a/nautobot_ssot/integrations/servicenow/diffsync/adapter_nautobot.py +++ b/nautobot_ssot/integrations/servicenow/diffsync/adapter_nautobot.py @@ -59,7 +59,7 @@ def load_locations(self): """Load Nautobot Location objects as DiffSync Location models.""" if self.site_filter is not None: # Load only direct ancestors of the given Site - locations = [] + locations = [self.site_filter] ancestor = self.site_filter.parent while ancestor is not None: locations.insert(0, ancestor)