diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-08-14 01:28:53 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-08-14 01:28:53 +0300 |
commit | 2f557ae3a558c654cc6f3befff22f5ee4ea6c3d9 (patch) | |
tree | 6889cacb580c080ce9b1edca82a42c521b9ccd53 /models | |
parent | be25e372a3f0b697572d37ae1ad580ec2262dd26 (diff) | |
download | wekan-2f557ae3a558c654cc6f3befff22f5ee4ea6c3d9.tar.gz wekan-2f557ae3a558c654cc6f3befff22f5ee4ea6c3d9.tar.bz2 wekan-2f557ae3a558c654cc6f3befff22f5ee4ea6c3d9.zip |
- Fix Import from Trello error 400.
Thanks to xet7 !
Diffstat (limited to 'models')
-rw-r--r-- | models/cards.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js index 2c0da093..04348e2f 100644 --- a/models/cards.js +++ b/models/cards.js @@ -6,6 +6,8 @@ Cards = new Mongo.Collection('cards'); Cards.attachSchema(new SimpleSchema({ title: { type: String, + optional: true, + defaultValue: '', }, archived: { type: Boolean, @@ -22,6 +24,8 @@ Cards.attachSchema(new SimpleSchema({ }, listId: { type: String, + optional: true, + defaultValue: '', }, swimlaneId: { type: String, @@ -31,10 +35,14 @@ Cards.attachSchema(new SimpleSchema({ // difficult to manage and less efficient. boardId: { type: String, + optional: true, + defaultValue: '', }, coverId: { type: String, optional: true, + defaultValue: '', + }, createdAt: { type: Date, @@ -49,15 +57,19 @@ Cards.attachSchema(new SimpleSchema({ customFields: { type: [Object], optional: true, + defaultValue: [], }, 'customFields.$': { type: new SimpleSchema({ _id: { type: String, + optional: true, + defaultValue: '', }, value: { type: Match.OneOf(String, Number, Boolean, Date), optional: true, + defaultValue: '', }, }), }, @@ -70,22 +82,28 @@ Cards.attachSchema(new SimpleSchema({ description: { type: String, optional: true, + defaultValue: '' }, requestedBy: { type: String, optional: true, + defaultValue: '', + }, assignedBy: { type: String, optional: true, + defaultValue: '', }, labelIds: { type: [String], optional: true, + defaultValue: '', }, members: { type: [String], optional: true, + defaultValue: [], }, receivedAt: { type: Date, @@ -107,6 +125,7 @@ Cards.attachSchema(new SimpleSchema({ type: Number, decimal: true, optional: true, + defaultValue: 0, }, isOvertime: { type: Boolean, @@ -126,6 +145,7 @@ Cards.attachSchema(new SimpleSchema({ sort: { type: Number, decimal: true, + defaultValue: '', }, subtaskSort: { type: Number, @@ -135,10 +155,12 @@ Cards.attachSchema(new SimpleSchema({ }, type: { type: String, + defaultValue: '', }, linkedId: { type: String, optional: true, + defaultValue: '', }, })); |