mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Fix migration attachment-cardCopy-fix-boardId-etc. Part 2.
Thanks to xet7 !
This commit is contained in:
parent
c41c26e5a1
commit
8555c24eb2
2 changed files with 94 additions and 39 deletions
|
@ -1425,7 +1425,7 @@ Migrations.add('attachment-cardCopy-fix-boardId-etc', () => {
|
|||
Attachments.find( {"meta.source": "copy"} ).forEach(_attachment => {
|
||||
const cardId = _attachment.meta.cardId;
|
||||
const card = Cards.findOne(cardId);
|
||||
if (card.boardId && card.listId && card.swimlaneId) {
|
||||
if (card.boardId !== undefined && card.listId !== undefined && card.swimlaneId !== undefined) {
|
||||
console.log("update attachment id: ", _attachment._id);
|
||||
Attachments.update(_attachment._id, {
|
||||
$set: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue