fix: prevent modifications to transmitted edocuments#36
Merged
pritambiswal merged 3 commits intoprilk-consulting:developfrom Feb 13, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Once an EDocument reaches a terminal state (
Transmission Successful,Transmission Failed,Matching Successful,Matching Failed), it should be treated as immutable.Without this fix,
before_savere-runs XML validation on every save, which resets the status back toValidation Successful— re-enabling the Send button on an already-transmitted document. Additionally, thestatusfield was editable by users, allowing manual overrides of system-managed state.Changes
Server-side (
edocument.py):generate_xml()andvalidate_xml()now throw if status isTransmission Successfulbefore_saveskips automatic re-validation for documents in terminal statusesClient-side (
edocument.js):DocType definition (
edocument.json):statusfield is nowread_only— it is entirely system-managed (set by validation, matching, and transmission logic), so users should not be able to manually override it