Commit 8fa52fdd authored by igoshin's avatar igoshin Committed by Matija Obreza
Browse files

Bugfixes to filtering

parent 3705c8b3
...@@ -279,7 +279,7 @@ public class ExplorerController extends BaseController { ...@@ -279,7 +279,7 @@ public class ExplorerController extends BaseController {
String[] selectedFilters =new String[0]; String[] selectedFilters =new String[0];
jsonFilter=jsonFilter.replaceAll("_",":"); jsonFilter=jsonFilter.replaceAll("_",":");
Crop crop=null;
if (StringUtils.isNotBlank(jsonPick)) { if (StringUtils.isNotBlank(jsonPick)) {
// Cleanup JSON pick // Cleanup JSON pick
try { try {
...@@ -297,7 +297,7 @@ public class ExplorerController extends BaseController { ...@@ -297,7 +297,7 @@ public class ExplorerController extends BaseController {
if (filters.get("crop") != null) { if (filters.get("crop") != null) {
String shortName = filters.get("crop").get(0); String shortName = filters.get("crop").get(0);
// Add crop descriptors // Add crop descriptors
Crop crop = cropService.getCrop(shortName); crop = cropService.getCrop(shortName);
if (crop != null) { if (crop != null) {
List<ParameterCategory> categories = traitService.listCategories(); List<ParameterCategory> categories = traitService.listCategories();
...@@ -348,8 +348,7 @@ public class ExplorerController extends BaseController { ...@@ -348,8 +348,7 @@ public class ExplorerController extends BaseController {
Page<Accession> accessions = filterService.listAccessions(jsonTree, new PageRequest(page - 1, 50, new Sort("acceNumb"))); Page<Accession> accessions = filterService.listAccessions(jsonTree, new PageRequest(page - 1, 50, new Sort("acceNumb")));
_logger.info("Got: " + accessions); _logger.info("Got: " + accessions);
List<GenesysFilterService.GenesysFilter> additionalFilters = filterService.selectFilters(crop,selectedFilters);
List<GenesysFilterService.GenesysFilter> additionalFilters = filterService.selectFilters(selectedFilters);
List<GenesysFilterService.GenesysFilter> availableFilters =filterService.listAvailableFilters(); List<GenesysFilterService.GenesysFilter> availableFilters =filterService.listAvailableFilters();
List<GenesysFilterService.GenesysFilter> allFilters=new ArrayList<>(); List<GenesysFilterService.GenesysFilter> allFilters=new ArrayList<>();
......
...@@ -420,7 +420,9 @@ ...@@ -420,7 +420,9 @@
jsonValue = jsonData[key]; jsonValue = jsonData[key];
} }
if (!isNaN(inputValue1) && !isNaN(inputValue2)) { var notNull=inputValue1!=''&&inputValue2!='';
if (!isNaN(inputValue1) && !isNaN(inputValue2)&&notNull) {
if (inputValue1 == inputValue2) { if (inputValue1 == inputValue2) {
jsonValue.push(parseFloat(inputValue1)); jsonValue.push(parseFloat(inputValue1));
......
Supports Markdown
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