summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorRomulus Urakagi Tsai <urakagi@gmail.com>2019-11-20 10:40:09 +0000
committerRomulus Urakagi Tsai <urakagi@gmail.com>2019-11-20 10:40:09 +0000
commit4dcdec0084414e7dde9e630add01ecd2865bd941 (patch)
treeba145af20e31e57c48e25948d14f31469e8b2690 /server
parent05c53ca01d71a01a608c9ae345475abd67c9939b (diff)
downloadwekan-4dcdec0084414e7dde9e630add01ecd2865bd941.tar.gz
wekan-4dcdec0084414e7dde9e630add01ecd2865bd941.tar.bz2
wekan-4dcdec0084414e7dde9e630add01ecd2865bd941.zip
Attachment upload from card done, need to fix download link
Diffstat (limited to 'server')
-rw-r--r--server/migrations.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/migrations.js b/server/migrations.js
index 836220f3..7d5a5cca 100644
--- a/server/migrations.js
+++ b/server/migrations.js
@@ -80,7 +80,7 @@ Migrations.add('lowercase-board-permission', () => {
Migrations.add('change-attachments-type-for-non-images', () => {
const newTypeForNonImage = 'application/octet-stream';
Attachments.find().forEach(file => {
- if (!file.isImage()) {
+ if (!file.isImage) {
Attachments.update(
file._id,
{
@@ -97,7 +97,7 @@ Migrations.add('change-attachments-type-for-non-images', () => {
Migrations.add('card-covers', () => {
Cards.find().forEach(card => {
- const cover = Attachments.findOne({ cardId: card._id, cover: true });
+ const cover = Attachments.findOne({ 'meta.cardId': card._id, cover: true });
if (cover) {
Cards.update(card._id, { $set: { coverId: cover._id } }, noValidate);
}