Skip to content

Commit

Permalink
Merge pull request #70 from fishtown-analytics/fix/custom-accepted-va…
Browse files Browse the repository at this point in the history
…lue-types

handle non-array (var) entries to accepted_values test
  • Loading branch information
drewbanin authored Feb 27, 2020
2 parents af436a8 + 4ebd396 commit f0d29a8
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 f0d29a8

Please sign in to comment.