mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Add migration to fix circular references
This commit is contained in:
parent
745f39ed20
commit
a338e937e5
1 changed files with 8 additions and 0 deletions
|
@ -517,3 +517,11 @@ Migrations.add('add-templates', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
Migrations.add('fix-circular-reference', () => {
|
||||
Cards.find().forEach((card) => {
|
||||
if (card.parentId === card._id) {
|
||||
Cards.update(card._id, {$set: {parentId: ''}}, noValidateMulti);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue