Skip to content

Commit b0bcaed

Browse files
keviiin38pandafy
andauthored
[fix] Fixed create_default_topology condition check #421
Fixes #421 --------- Co-authored-by: Gagan Deep <the.one.above.all.titan@gmail.com>
1 parent f8156d6 commit b0bcaed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

images/openwisp_dashboard/load_init_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import django
1616
import redis
17+
from openwisp.utils import env_bool
1718

1819
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openwisp.settings')
1920
django.setup()
@@ -254,6 +255,6 @@ def create_default_topology(vpn):
254255
create_default_credentials()
255256
create_ssh_key_template()
256257

257-
if os.environ.get('USE_OPENWISP_TOPOLOGY', False):
258+
if env_bool(os.environ.get('USE_OPENWISP_TOPOLOGY')):
258259
Topology = load_model('topology', 'Topology')
259260
create_default_topology(default_vpn)

0 commit comments

Comments
 (0)