fix: Race condition fetching collection after doc create
This commit is contained in:
parent
f0de382367
commit
1ed257de62
@ -160,7 +160,7 @@ export default class Document extends BaseModel {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (isCreating) {
|
if (isCreating) {
|
||||||
return this.store.create({
|
return await this.store.create({
|
||||||
parentDocumentId: this.parentDocumentId,
|
parentDocumentId: this.parentDocumentId,
|
||||||
collectionId: this.collectionId,
|
collectionId: this.collectionId,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
@ -169,7 +169,7 @@ export default class Document extends BaseModel {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.store.update({
|
return await this.store.update({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
title: this.title,
|
title: this.title,
|
||||||
text: this.text,
|
text: this.text,
|
||||||
|
Reference in New Issue
Block a user