Move document improvements (#927)
* Show all collections in UI * Introduce command pattern * Actually remove from previous collection * Stash * Fixes: Promises resolved outside of response lifecycle * 💚 * 💚 * documentMover tests * Transaction * Perf. More in transactions
This commit is contained in:
@ -362,7 +362,7 @@ Document.prototype.publish = async function() {
|
||||
Document.prototype.archive = async function(userId) {
|
||||
// archive any children and remove from the document structure
|
||||
const collection = await this.getCollection();
|
||||
await collection.removeDocumentInStructure(this, { save: true });
|
||||
await collection.removeDocumentInStructure(this);
|
||||
this.collection = collection;
|
||||
|
||||
await this.archiveWithChildren(userId);
|
||||
|
Reference in New Issue
Block a user