From 56ba8fc9589ab89034ad16f07f03fddcc8c92651 Mon Sep 17 00:00:00 2001 From: Vikrant Date: Fri, 18 Sep 2026 01:27:59 +0530 Subject: [PATCH] Scope already-reported students by their actual batch, not just year/discipline get_batch_students built its academic_students list (students already transferred to the main academic tables) by matching year + programme type + discipline only, never the specific batch_id. So a reported student leaked into every sibling batch of the same year/discipline/programme type, e.g. a PhD Design student assigned to the Odd 2019 batch also showed up in the Even 2019 batch of the same discipline. Filtering on batch_id scopes it correctly. --- .../programme_curriculum/api/views_student_management.py | 1 + 1 file changed, 1 insertion(+) diff --git a/FusionIIIT/applications/programme_curriculum/api/views_student_management.py b/FusionIIIT/applications/programme_curriculum/api/views_student_management.py index f1bbfa314..0f86a50b0 100644 --- a/FusionIIIT/applications/programme_curriculum/api/views_student_management.py +++ b/FusionIIIT/applications/programme_curriculum/api/views_student_management.py @@ -4827,6 +4827,7 @@ def get_batch_students(request, batch_id): academic_student_records = AcademicStudent.objects.filter( batch=batch.year, + batch_id=batch.id, programme__icontains=programme_type.upper() )