From 6cc4c67387a2ec53e659e27ff5a7e300d9591d59 Mon Sep 17 00:00:00 2001 From: Aleksandar Radunovic Date: Tue, 16 Oct 2018 09:12:43 +0200 Subject: [PATCH] Remove default pop value --- startup_scripts/41_sites.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/startup_scripts/41_sites.py b/startup_scripts/41_sites.py index 7240689..d78cfd9 100644 --- a/startup_scripts/41_sites.py +++ b/startup_scripts/41_sites.py @@ -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) -