Skip to content

Commit

Permalink
Fix set_index in valuesets in project_questions (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Nov 25, 2021
1 parent c8a1794 commit af1d977
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ angular.module('project_questions')
valuesets: function(set_prefix, set_index) {
return {
set_prefix: set_prefix,
set_index: set_index,
set_index: parseInt(set_index),
hidden: {
questionsets: {},
questions: {},
Expand Down Expand Up @@ -1047,7 +1047,7 @@ angular.module('project_questions')
if (service.valuesets[questionset.id][set_prefix].length > 0) {
var valuesets = $filter('orderBy')(service.valuesets[questionset.id][set_prefix], '-set_index');
var last_set_index = valuesets[0].set_index;
set_index = parseInt(last_set_index) + 1;
set_index = last_set_index + 1;
}
service.valuesets[questionset.id][set_prefix].push(factories.valuesets(set_prefix, set_index));

Expand Down

0 comments on commit af1d977

Please sign in to comment.