Skip to content

Commit

Permalink
handle non-array (var) entries to accepted_values test
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbanin committed Feb 27, 2020
1 parent af436a8 commit 4ebd396
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/services/project_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ angular
test_info.short = 'F';
test_info.label = 'Foreign Key';
} else if (test.test_metadata.name == 'accepted_values') {
var values = test.test_metadata.kwargs.values.join(", ")
if (Array.isArray(test.test_metadata.kwargs.values)) {
var values = test.test_metadata.kwargs.values.join(", ")
} else {
var values = JSON.stringify(test.test_metadata.kwargs.values);
}
test_info.short = 'A';
test_info.label = 'Accepted Values: ' + values;
} else {
Expand Down

0 comments on commit 4ebd396

Please sign in to comment.