From 956520eb29c2f73725336347fdd3951770aab170 Mon Sep 17 00:00:00 2001 From: Brent O'Connor Date: Sat, 18 Jan 2025 10:50:55 -0600 Subject: [PATCH] Fix MyPy error for reals --- config/settings/_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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