Open nickdos opened 7 years ago
getMostRecordedSpecies service is returning null for species_group Fish. https://biocache.ala.org.au/ws/occurrences/search?q=*:*&fq=species_group:Fish&flimit=6&pageSize=0&fsort=count&facets=species_guid
Seems like Biocache doesn't have occurrence data for Fish?
Looks like not all groups are listed for example Molluscs , Protozoa, Crustaceans etc https://github.com/AtlasOfLivingAustralia/dashboard/blob/grails3/grails-app/controllers/au/org/ala/dashboard/DashboardController.groovy#L311
Could the group and count be obtained from the query https://biocache.ala.org.au/ws/occurrences/search?q=*:*&fq=species_group:*&flimit=30&pageSize=0&fsort=count&facets=species_group rather than hardcoded?
"Show raw data" link on dashboard - "https://dashboard.ala.org.au/dashboard/data
returns NPE error:
Cannot get property 'facets' on null object
->> 273 | doCall in au.org.ala.dashboard.DashboardController$_closure29
Line 273 of DashboardController:
metadataService.getMostRecordedSpecies(group).facets?.each() {
quick fix would be to add
?.
beforefacets
but better fix is to work out why thegetMostRecordedSpecies
service is returning null and/or make the service null-safe.