Commit 62c8b10d authored by Matija Obreza's avatar Matija Obreza

Fix: AppliedFilters default to historic = false when not provided, adjust...

Fix: AppliedFilters default to historic = false when not provided, adjust AccessionFilter accordingly.
parent e5e0c608
......@@ -106,6 +106,15 @@ public class AppliedFiltersConverter {
public static AccessionFilter convert(AppliedFilters filters) throws Exception {
LOG.trace("Converting {}", filters.toString());
AppliedFilter historic = filters.get(FilterConstants.HISTORIC);
if (historic == null || CollectionUtils.isEmpty(historic.getValues())) {
LOG.debug("Forcing active accessions filter!");
AppliedFilter forceActive=new AppliedFilter();
forceActive.setFilterName(FilterConstants.HISTORIC);
forceActive.addFilterValue(new LiteralValueFilter(false));
filters.add(forceActive);
}
AccessionFilter f = new AccessionFilter();
for (Field field : FilterConstants.class.getDeclaredFields()) {
......
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