summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-06-06 17:36:20 +0000
committerRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-06-06 17:36:20 +0000
commit4787a1186bb844c598758a910aba5a88c64f87fc (patch)
tree3730e6dbc3af639a611812739a0b7e1b492765af
parentd6eff2a07453cad87623955905ddb6ce247aa719 (diff)
downloadwekan-4787a1186bb844c598758a910aba5a88c64f87fc.tar.gz
wekan-4787a1186bb844c598758a910aba5a88c64f87fc.tar.bz2
wekan-4787a1186bb844c598758a910aba5a88c64f87fc.zip
Adjust 'add-profile-view' in migrations.js in attempt to resolve 1675
-rw-r--r--server/migrations.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/server/migrations.js b/server/migrations.js
index d59d6d8f..f877200a 100644
--- a/server/migrations.js
+++ b/server/migrations.js
@@ -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
+ );
+ }
});
});