diff --git a/mealie/routes/auth/auth.py b/mealie/routes/auth/auth.py index 080b68f80f93..8aa6cd6664c8 100644 --- a/mealie/routes/auth/auth.py +++ b/mealie/routes/auth/auth.py @@ -67,7 +67,8 @@ def get_token( if "," in ip: # if there are multiple IPs, the first one is canonically the true client ip = str(ip.split(",")[0]) else: - ip = request.client.host + # request.client should never be null, except sometimes during testing + ip = request.client.host if request.client else "unknown" try: user = authenticate_user(session, email, password) # type: ignore