Skip to content

Commit

Permalink
fix: use frm.set_value for updating fields (#22860) (#22869)
Browse files Browse the repository at this point in the history
Just updating frm.doc object doesn't update the underlying model. In Frappe `frm.doc` is NOT the primary representation or source of truth for better or worse.

(cherry picked from commit a3db75e)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Oct 23, 2023
1 parent 82d8809 commit 1df1a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/public/js/form_builder/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const useStore = defineStore("form-builder-store", () => {
let fields = get_updated_fields();
let has_error = validate_fields(fields, doc.value.istable);
if (has_error) return has_error;
doc.value.fields = fields;
frm.value.set_value("fields", fields);
return fields;
} catch (e) {
console.error(e);
Expand Down

0 comments on commit 1df1a27

Please sign in to comment.