Commit b73de1e7 authored by Thibault Ehrhart's avatar Thibault Ehrhart

Fix genres filter

parent d0244ee8
......@@ -264,7 +264,7 @@ export class NewsService {
context.genres = [context.genres];
}
if (Array.isArray(context.genres) && context.genres.length > 0) {
genresFilter = 'OPTIONAL { ?s rnews:genre ?genre . } FILTER (?genre NOT IN(' + context.genres.map(uri => '<' + uri + '>').join(',') + '))';
genresFilter = 'OPTIONAL { ?s rnews:genre ?genre . } FILTER (?genre NOT IN(' + context.genres.map(genre => JSON.stringify(genre) + ' ') + '))';
}
// Date filter
......
......@@ -13,8 +13,9 @@ export class SearchService {
searchParams: NewsContext = {
annotations: [],
genres: [
'http://cv.iptc.org/newscodes/genre/Program',
'http://cv.iptc.org/newscodes/genre/Advisory'
'Program',
'Advisory',
'Update'
]
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment