Skip to content

fix: retire review PII without triggering review save signals - #1361

Open
naincy128 wants to merge 1 commit into
openedx:masterfrom
naincy128:fix/retire-user-skip-review-signals
Open

naincy128 wants to merge 1 commit into
openedx:masterfrom
naincy128:fix/retire-user-skip-review-signals

Conversation

@naincy128

@naincy128 naincy128 commented Nov 2, 2026 •

Copy link
Copy Markdown

Root cause

_retire_proctored_exam_software_secure_review_and_history_and_comment cleared raw_data / encrypted_video_url by calling .save() on each review and review-history row. Saving a ProctoredExamSoftwareSecureReview fires:

  • pre_save → on_review_changed: archives the un-retired review, PII included, into ProctoredExamSoftwareSecureReviewHistory.
  • post_save → finish_review_workflow: calls get_backend_provider() for the exam (this raises when the backend was removed from PROCTORING_BACKENDS), then update_attempt_status() (credit/grades/certificates side effects) and emits review_received.

Retirement only needs to scrub PII. Re-running the review workflow is unnecessary and can fail.

Fix

Clear the fields with QuerySet.update() on the reviews and review history, so no save signals fire. Comment retirement is unchanged (it already used bulk_update).

Behavior changes:

  • Retirement no longer fails for reviews on exams with an unconfigured backend.
  • Retirement no longer changes attempt status, touches credit/grades, or emits review_received events.
  • Retirement no longer writes a new history row containing the pre-retirement PII.

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