feat: agregar contadores de usuarios por rol y paginacion reforzada (v3.8.13)

This commit is contained in:
2026-10-26 12:41:50 -03:00
parent 71a0ac5d11
commit 85f320d96e
13 changed files with 240 additions and 22 deletions
+3 -3
View File
@@ -161,7 +161,7 @@ def list_subjects(
Subject.careers.any(Career.name.ilike(f'%{s_clean}%'))
)
)
parsed_career_id = int(career_id.strip()) if career_id and str(career_id).strip().isdigit() else None
parsed_career_id = int(career_id.strip()) if career_id and career_id.strip().isdigit() else None
if parsed_career_id:
query = query.filter(or_(Subject.career_id == parsed_career_id, Subject.careers.any(Career.id == parsed_career_id)))
if active == 'true':
@@ -428,8 +428,8 @@ def list_commissions(
Subject.code.ilike(f'%{s_clean}%')
)
)
parsed_subject_id = int(subject_id.strip()) if subject_id and str(subject_id).strip().isdigit() else None
parsed_career_id = int(career_id.strip()) if career_id and str(career_id).strip().isdigit() else None
parsed_subject_id = int(subject_id.strip()) if subject_id and subject_id.strip().isdigit() else None
parsed_career_id = int(career_id.strip()) if career_id and career_id.strip().isdigit() else None
if parsed_subject_id:
query = query.filter(Commission.subject_id == parsed_subject_id)
if parsed_career_id: