Skip to content

Do not persist REPORTED status when the main-table transfer fails - #1996

Merged
vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:fix/reported-status-revert-on-transfer-failure
Sep 17, 2026
Merged

vikrantwiz02 merged 1 commit into
FusionIIIT:prod/acad-reactfrom
vikrantwiz02:fix/reported-status-revert-on-transfer-failure

Conversation

@vikrantwiz02

Copy link
Copy Markdown
Member

Summary

  • update_student_status saved reported_status = REPORTED unconditionally before attempting the ExtraInfo/Student/User transfer, so any failure in that transfer (batch not found, or any other exception) left the status permanently stuck at REPORTED with nothing actually transferred
  • Since the transfer only runs when old_status != REPORTED, a stuck REPORTED status also silently disabled all future retries for that student
  • Reverts reported_status back to old_status on every failure path in that block, and the response now reports success:false with an honest message when the transfer didn't complete
  • Applies uniformly to UG, PG and PhD since they share this same function

Test plan

  • Python syntax check passes
  • Traced all failure paths in the REPORTED-transfer branch (2 explicit BATCH_NOT_FOUND early returns + the catch-all exception handler)

update_student_status saved reported_status = REPORTED before attempting the
ExtraInfo/Student/User transfer, so a failed transfer (batch not found, or any
exception during the transfer) left the status permanently stuck at REPORTED
with nothing actually created. That also disabled retries, since the guard
that triggers the transfer only fires when old_status != REPORTED. Revert the
status back to old_status on every failure path in that block, and report
success:false with an honest message when the transfer didn't complete. This
covers UG, PG and PhD alike since they share this same function.
@vikrantwiz02
vikrantwiz02 merged commit e5eafa3 into FusionIIIT:prod/acad-react Sep 17, 2026
1 check passed
@vikrantwiz02
vikrantwiz02 deleted the fix/reported-status-revert-on-transfer-failure branch September 17, 2026 19:36
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