Skip to content

Commit

Permalink
feat: ensure values for all name locales
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Aug 29, 2019
1 parent b98c174 commit ccb6ab8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/priority.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ PrioritySchema.pre('validate', function preValidate(next) {
* @instance
*/
PrioritySchema.methods.preValidate = function preValidate(done) {
// ensure name for all locales
this.name = localizedValuesFor(this.name);

// set default color if not set
if (_.isEmpty(this.color)) {
this.color = randomColor();
Expand Down

0 comments on commit ccb6ab8

Please sign in to comment.