Skip to content

Commit

Permalink
Ignore default string values with whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
creisle committed Jul 13, 2019
1 parent e883efb commit 5724585
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/repo/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
const orientjs = require('orientjs');
const kbSchema = require('@bcgsc/knowledgebase-schema');

const {logger} = require('./logging');


class Property extends kbSchema.Property {
/**
Expand All @@ -26,7 +28,10 @@ class Property extends kbSchema.Property {
dbProperties.linkedClass = model.linkedClass.name;
}
if (model.default !== undefined) {
dbProperties.default = model.default;
// TODO: PENDING https://github.com/orientechnologies/orientjs/issues/379
if (model.type !== 'string' || !/\s+/.exec(model.default)) {
dbProperties.default = model.default;
}
}
/** TODO: pending resolution https://github.com/orientechnologies/orientjs/issues/377
if (model.min !== undefined) {
Expand Down

0 comments on commit 5724585

Please sign in to comment.