endpoints: fix tasks failing (#20904)

* endpoints: fix tasks failing

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* fix

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens L.
2026-03-15 01:47:02 +01:00
committed by GitHub
parent 24a817cce8
commit 3d964ddd2e
5 changed files with 46 additions and 3 deletions

View File

@@ -58,8 +58,10 @@ def get_local_ip(override=True) -> str:
if (local_ip := getenv("LOCAL_IP")) and override:
return local_ip
hostname = socket.gethostname()
ip_addr = socket.gethostbyname(hostname)
return ip_addr
try:
return socket.gethostbyname(hostname)
except socket.gaierror:
return "0.0.0.0"
class SeleniumTestCase(DockerTestCase, StaticLiveServerTestCase):