diff --git a/models/cards.js b/models/cards.js index a674efe31..b72293cfa 100644 --- a/models/cards.js +++ b/models/cards.js @@ -271,6 +271,7 @@ Cards.attachSchema( type: Number, decimal: true, defaultValue: 0, + optional: true, }, subtaskSort: { /** diff --git a/models/trelloCreator.js b/models/trelloCreator.js index d7e861a75..2054cf28b 100644 --- a/models/trelloCreator.js +++ b/models/trelloCreator.js @@ -157,9 +157,14 @@ export class TrelloCreator { // You must call parseActions before calling this one. createBoardAndLabels(trelloBoard) { + let color = 'blue'; + if (this.getColor(trelloBoard.prefs.background) !== undefined) { + color = this.getColor(trelloBoard.prefs.background); + } + const boardToCreate = { archived: trelloBoard.closed, - color: this.getColor(trelloBoard.prefs.background), + color: color, // very old boards won't have a creation activity so no creation date createdAt: this._now(this.createdAt.board), labels: [],