Skip to content

Clean up main academic tables when withdrawing a reported student - #1995

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:fix/withdrawal-status-orphan-record
Sep 17, 2026
Merged

vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:fix/withdrawal-status-orphan-record

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

Summary

  • update_student_status only reverted the ExtraInfo/Student/User records created on REPORTED when the new status was NOT_REPORTED or PENDING; withdrawing a previously-reported student left a stale Student row behind
  • That stale row made verify_course (Student Courses lookup) treat the withdrawn student as active with zero registered courses instead of returning the proper "status is WITHDRAWAL" error
  • Extended the same cleanup path to also run for the REPORTED -> WITHDRAWAL transition

Test plan

  • Verified locally against a students in this exact orphaned state (reported_status=WITHDRAWAL with a lingering main-table Student row)
  • Python syntax check passes

update_student_status only removed the ExtraInfo/Student/User rows it had
created on REPORTED when the new status was NOT_REPORTED or PENDING, so a
student withdrawn after being reported kept a stale Student row behind. That
stale row made verify_course treat them as an active student with zero
registered courses instead of returning the WITHDRAWAL status error.
@vikrantwiz02
vikrantwiz02 merged commit eacc651 into FusionIIIT:prod/acad-react Sep 17, 2026
1 check passed
@vikrantwiz02
vikrantwiz02 deleted the fix/withdrawal-status-orphan-record branch September 17, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant