[Fix] Inactive student validation issue while disabling the student group (#15095)
This commit is contained in:
		
							parent
							
								
									26bfede116
								
							
						
					
					
						commit
						fc682c86c6
					
				| @ -33,7 +33,7 @@ class StudentGroup(Document): | |||||||
| 		program_enrollment = get_program_enrollment(self.academic_year, self.academic_term, self.program, self.batch, self.course) | 		program_enrollment = get_program_enrollment(self.academic_year, self.academic_term, self.program, self.batch, self.course) | ||||||
| 		students = [d.student for d in program_enrollment] if program_enrollment else [] | 		students = [d.student for d in program_enrollment] if program_enrollment else [] | ||||||
| 		for d in self.students: | 		for d in self.students: | ||||||
| 			if not frappe.db.get_value("Student", d.student, "enabled") and d.active: | 			if not frappe.db.get_value("Student", d.student, "enabled") and d.active and not self.disabled: | ||||||
| 				frappe.throw(_("{0} - {1} is inactive student".format(d.group_roll_number, d.student_name))) | 				frappe.throw(_("{0} - {1} is inactive student".format(d.group_roll_number, d.student_name))) | ||||||
| 
 | 
 | ||||||
| 			if (self.group_based_on == "Batch") and cint(frappe.defaults.get_defaults().validate_batch)\ | 			if (self.group_based_on == "Batch") and cint(frappe.defaults.get_defaults().validate_batch)\ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user