Remove default pop value

This commit is contained in:
Aleksandar Radunovic 2018-10-16 09:12:43 +02:00
parent ab0ce20971
commit 6cc4c67387

View File

@ -9,7 +9,7 @@ with open('/opt/netbox/initializers/sites.yml', 'r') as stream:
if sites is not None:
for site_params in sites:
if "region" in site_params:
region = Region.objects.get(name=site_params.pop('region', None))
region = Region.objects.get(name=site_params.pop('region'))
site_params['region'] = region
@ -17,4 +17,3 @@ with open('/opt/netbox/initializers/sites.yml', 'r') as stream:
if created:
print("Created site", site.name)