Remove default pop value

This commit is contained in:
Aleksandar Radunovic 2018-10-16 09:12:43 +02:00
parent ab0ce20971
commit 6cc4c67387
1 changed files with 1 additions and 2 deletions

View File

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