fix: persist submitted documents and clear remaining lint findings - #131
Merged
av-dev2 merged 3 commits intoAug 26, 2026
Conversation
round() with a single argument already returns an int.
purchase_invoice, journal_entry and stock_entry were assigned on self inside on_submit. Frappe has already written the row by then, so the assignments were discarded and the link fields stayed empty. db_set writes them to the database. Records submitted before this change keep their empty fields.
Each waiver names the rule and says why. frappe-ssti: the template path is a hardcoded literal shipped in this app and the template has no include, import or extends. Only context values vary. override-doctype-class: ReportOverride subclasses frappe's own Report; this is the documented hook. frappe-codeinjection-eval: Script Report python needs real imports, so safe_exec is not usable. Editing a Report is restricted to System Manager. Revisit if that write access is ever widened. frappe-breaks-multitenancy: query builder tables built at import in one report. Only misbehaves on a bench mixing MariaDB and Postgres sites.
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin version-16-hotfix
git worktree add -d .worktree/backport-131-to-version-16-hotfix origin/version-16-hotfix
cd .worktree/backport-131-to-version-16-hotfix
git switch --create backport-131-to-version-16-hotfix
git cherry-pick -x 12ed2cb78496b141907e50a815d34fd2630f007e b7272fba5539f9894a6c781642727ae997a45124 0cef17ef7bf5d3b96b01d8d04ffc9dcb5590fb8d |
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.
Follow-up to #130, which merged before these three commits landed.
Submitted documents were never linked
purchase_invoice,journal_entryandstock_entrywere assigned onselfinside
on_submit. Frappe has already written the row by then, so theassignments were discarded and the link fields stayed empty in the database.
They now go through
db_set. Records submitted before this change keep theirempty fields.
Lint
int(round(...))dropped;round()with one argument already returns an int.Semgrep waivers
Four findings reviewed and waived, each with the rule name and a reason in the
code.
frappe-sstiinclude,importorextends. Only context values vary.override-doctype-classReportOverridesubclasses frappe ownReport; this is the documented hook.frappe-codeinjection-evalsafe_execis not usable. Editing a Report is restricted to System Manager.frappe-breaks-multitenancyThe
frappe-codeinjection-evalwaiver documents the risk rather than removingit. If Report write access is ever widened beyond System Manager, revisit it.
pre-commit run --all-filespasses on this branch.