Skip to content

Commit

Permalink
data-quality: schedule: Catch errors when the model or subclassgraph …
Browse files Browse the repository at this point in the history
…is unknown
  • Loading branch information
Jared Parnell committed Apr 1, 2021
1 parent 4bb1e75 commit 95c782f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('ScheduleEventTypeIsEventSubclass', () => {
}
});

it('should return errors if scheduleEventType does not have a subClassGraph', async () => {
it('should not errors if scheduleEventType does not have a subClassGraph', async () => {
const model = new Model({
type: 'Schedule',
subClassGraph: ['#Event'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = class ScheduleEventTypeIsEventSubclass extends Rule {
errorCondition = 'modelIsNotEventSubClass';
}

if (errorCondition === 'modelIsNotEventSubClass') {
if (errorCondition) {
errors.push(
this.createError(
errorCondition,
Expand All @@ -73,8 +73,6 @@ module.exports = class ScheduleEventTypeIsEventSubclass extends Rule {
},
),
);
} else {
return [];
}

return errors;
Expand Down

0 comments on commit 95c782f

Please sign in to comment.