Fix creation of card links

Without this fix, orphaned card links are created and therefore this leads to
problems as described in https://github.com/wekan/wekan/issues/2785.
This commit is contained in:
Marc Hartmayer 2020-04-29 22:38:50 +02:00
parent c7d4a90d5c
commit 2691f033cb
2 changed files with 16 additions and 4 deletions

View file

@ -658,10 +658,7 @@ BlazeComponent.extendComponent({
_id = element.copy(this.boardId, this.swimlaneId, this.listId);
// 1.B Linked card
} else {
delete element._id;
element.type = 'cardType-linkedCard';
element.linkedId = element.linkedId || element._id;
_id = Cards.insert(element);
_id = element.link(this.boardId, this.swimlaneId, this.listId);
}
Filter.addException(_id);
// List insertion