From cd7aaa9ce2c6b4525870fd4b26ac638f0132aa7d Mon Sep 17 00:00:00 2001 From: patrick Date: Fri, 30 Oct 2026 13:53:51 +0100 Subject: [PATCH] fix(busylight): Pull-Token deaktivierter Firmen ablehnen Co-Authored-By: Claude Sonnet 5.5 --- backend/app/routers/busylight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/routers/busylight.py b/backend/app/routers/busylight.py index 4e92103..9ca2728 100644 --- a/backend/app/routers/busylight.py +++ b/backend/app/routers/busylight.py @@ -110,7 +110,7 @@ async def _company_from_token( raise HTTPException(status_code=401, detail="Missing token") token_hash = _hash_token(credentials.credentials) company = await db.scalar( - select(Company).where(Company.busylight_pull_token_hash == token_hash) + select(Company).where(Company.busylight_pull_token_hash == token_hash, Company.is_active.is_(True)) ) if company is None: raise HTTPException(status_code=401, detail="Invalid token")