mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
Adjust 'add-profile-view' in migrations.js in attempt to resolve 1675
This commit is contained in:
parent
d6eff2a074
commit
4787a1186b
1 changed files with 8 additions and 6 deletions
|
@ -211,12 +211,14 @@ Migrations.add('add-checklist-items', () => {
|
|||
|
||||
Migrations.add('add-profile-view', () => {
|
||||
Users.find().forEach((user) => {
|
||||
// Set default view
|
||||
Users.direct.update(
|
||||
{ _id: user._id },
|
||||
{ $set: { 'profile.boardView': 'board-view-lists' } },
|
||||
noValidate
|
||||
);
|
||||
if (!user.hasOwnProperty('profile.boardView')) {
|
||||
// Set default view
|
||||
Users.direct.update(
|
||||
{ _id: user._id },
|
||||
{ $set: { 'profile.boardView': 'board-view-lists' } },
|
||||
noValidate
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue