Skip to content

Commit

Permalink
[FIX] call save() before load() to avoid losing any other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
benwillig committed Feb 14, 2024
1 parent 3ffe32a commit 075b27d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,12 @@ export class FsImageRelationDndUploadField extends X2ManyField {
async createFieldRelationRecords(createValues) {
const self = this;
const model = self.env.model;
const record = model.root;
record.save();
model.orm
.call(self.activeField.relation, "create", [createValues])
.then(() => {
model.root.load();
model.root.save();
record.load();
})
.then(() => {
unblockUI();
Expand Down

0 comments on commit 075b27d

Please sign in to comment.