From 19bc7a2b57cca40f8304a636ffb091aefaffb8df Mon Sep 17 00:00:00 2001 From: Galindo97 Date: Wed, 20 May 2026 11:09:24 -0500 Subject: [PATCH] fix(license): handle unlimited user licenses by checking for None value --- backend/api/v1/modules/core/users/service.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/api/v1/modules/core/users/service.py b/backend/api/v1/modules/core/users/service.py index 3adb4782..f34474bc 100644 --- a/backend/api/v1/modules/core/users/service.py +++ b/backend/api/v1/modules/core/users/service.py @@ -142,6 +142,11 @@ class UserService: .scalar() ) + # max_users=NULL en BD indica licencia sin cuota (ilimitada). + # Comparar con None lanzaría TypeError — salida temprana explícita. + if license.max_users is None: + return + if active_users >= license.max_users: raise HTTPException( status_code=403,