diff options
author | Ghassen Rjab <rjab.ghassen@gmail.com> | 2017-09-27 22:23:55 +0100 |
---|---|---|
committer | Ghassen Rjab <rjab.ghassen@gmail.com> | 2017-09-27 22:23:55 +0100 |
commit | 109cd08151a26165bd63c132b37a00cc164c8491 (patch) | |
tree | 16506c158f1d9952c6a36b636e585f279a6ef036 | |
parent | f883757552c839309a8072b6e97da1da3ee38d87 (diff) | |
download | wekan-109cd08151a26165bd63c132b37a00cc164c8491.tar.gz wekan-109cd08151a26165bd63c132b37a00cc164c8491.tar.bz2 wekan-109cd08151a26165bd63c132b37a00cc164c8491.zip |
Use a default color (black) for labels from Trello
-rw-r--r-- | models/trelloCreator.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/models/trelloCreator.js b/models/trelloCreator.js index 909128f0..0f801ea3 100644 --- a/models/trelloCreator.js +++ b/models/trelloCreator.js @@ -113,7 +113,6 @@ export class TrelloCreator { check(trelloLabels, [Match.ObjectIncluding({ // XXX refine control by validating 'color' against a list of allowed // values (is it worth the maintenance?) - color: String, name: String, })]); } @@ -184,7 +183,7 @@ export class TrelloCreator { trelloBoard.labels.forEach((label) => { const labelToCreate = { _id: Random.id(6), - color: label.color, + color: label.color ? label.color : 'black', name: label.name, }; // We need to remember them by Trello ID, as this is the only ref we have |