diff --git a/config/settings/_base.py b/config/settings/_base.py index bd833762..b15d770a 100644 --- a/config/settings/_base.py +++ b/config/settings/_base.py @@ -37,8 +37,9 @@ # Get the IP to use for Django Debug Toolbar when developing with docker if env.bool("USE_DOCKER", default=False) is True: ip = socket.gethostbyname(socket.gethostname()) - if ip is not None: - INTERNAL_IPS += [ip[:-1] + "1"] + if INTERNAL_IPS is None: # Ensure INTERNAL_IPS is a list + INTERNAL_IPS = [] + INTERNAL_IPS += [ip[:-1] + "1"] # Application definition