Skip to content

Commit

Permalink
Merge pull request #546 from rfcx/bug/PI-504-can-not-filter-more-than…
Browse files Browse the repository at this point in the history
…-one-tag

PI-504 hotfix searching tags with the same value
  • Loading branch information
rassokhina-e authored Feb 19, 2021
2 parents 2f332f7 + 58eb4cd commit b361d1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion assets/app/a2services/project-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ angular.module('a2.srv.project', [
callback = query;
query = {};
}

if (query && query.tags) {
query['tags[]'] = query.tags.flat()
delete query.tags
}
$http.get('/api/project/'+url+'/recordings/search',{
params: query
})
Expand Down
3 changes: 2 additions & 1 deletion assets/app/app/audiodata/recordings/filter-parameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,12 @@ angular.module('a2.audiodata.recordings.filter-parameters', [
if (!tagsObj[key]) {
tagsObj[key] = {
tag: key,
tag_id: t.tag_id,
tag_id: [t.tag_id],
count: t.count
}
}
else {
tagsObj[key].tag_id.push(t.tag_id);
tagsObj[key].count++
}
})
Expand Down

0 comments on commit b361d1c

Please sign in to comment.