Skip to content

Commit

Permalink
Merge branch 'master' of github.com:rdmorganiser/rdmo
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Apr 6, 2017
2 parents 737872c + 775a596 commit 536f003
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/conditions/static/conditions/js/conditions.js
Expand Up @@ -112,8 +112,12 @@ angular.module('conditions', ['core'])

service.getOptions = function() {
if (angular.isDefined(service.values) && angular.isDefined(service.values.source)) {
attribute = $filter('filter')(service.attributes, {id: service.values.source})[0];
return attribute.options;
var attributes = $filter('filter')(service.attributes, {id: service.values.source});
for (var i = 0; i < attributes.length; i++) {
if (attributes[i].id == service.values.source) {
return attributes[i].options;
}
}
}
};

Expand Down

0 comments on commit 536f003

Please sign in to comment.