mirror of
https://github.com/wekan/wekan.git
synced 2026-02-06 00:21:48 +01:00
- [Fix deleting Custom Fields, removing broken references](https://github.com/wekan/wekan/issues/1872).
Thanks to Akuket and Clement87 !
This commit is contained in:
parent
bedd3767ce
commit
8cd5f7c185
2 changed files with 24 additions and 0 deletions
|
|
@ -71,6 +71,12 @@ if (Meteor.isServer) {
|
|||
Activities.remove({
|
||||
customFieldId: doc._id,
|
||||
});
|
||||
|
||||
Cards.update(
|
||||
{'boardId': doc.boardId, 'customFields._id': doc._id},
|
||||
{$pull: {'customFields': {'_id': doc._id}}},
|
||||
{multi: true}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -321,3 +321,21 @@ Migrations.add('add-subtasks-allowed', () => {
|
|||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
Migrations.add('remove-tag', () => {
|
||||
Users.update({
|
||||
}, {
|
||||
$unset: {
|
||||
'profile.tags':1,
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
Migrations.add('remove-customFields-references-broken', () => {
|
||||
Cards.update({'customFields.$value': null},
|
||||
{ $pull: {
|
||||
customFields: {value: null},
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue