Skip to content

Commit

Permalink
fix: 🐛 Correct signal to have LocationType update/create
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrew82 committed Jul 17, 2023
1 parent 51332fa commit 6256a8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nautobot_ssot/integrations/aci/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ def aci_create_site(apps, **kwargs):
site = apps.get_model("dcim", "Location")
location_type = apps.get_model("dcim", "LocationType")
apics = PLUGIN_CFG.get("apics")
loc_type = location_type.objects.update_or_create(name="Site")[0]
for key in apics:
if "SITE" in key:
logger.info(f"Creating Site: {apics[key]}")
site.objects.update_or_create(name=apics[key], location_type=location_type)
site.objects.update_or_create(name=apics[key], location_type=loc_type)


def device_custom_fields(apps, **kwargs):
Expand Down

0 comments on commit 6256a8b

Please sign in to comment.