Skip to content

Commit

Permalink
Fixes issue #634
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Milaitis authored and Michael Milaitis committed Dec 17, 2024
1 parent 40beb51 commit 466b07f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changes/634.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ServiceNow Integration
When running the Nautobot ⟹ ServiceNow job with a site filter set, you expect the job to sync only the specified locations to ServiceNow.
However, it appears that the job currently loads only the parent locations, not the specified location itself.
This is fixed by initializing the locations list with the user-selected location and then loading the parent locations of that selection.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 466b07f

Please sign in to comment.