Skip to content

Commit 1b90e5c

Browse files
author
Adam Collins
committed
#596 remove faulty formatting for stateConservation comparison
1 parent bf88c04 commit 1b90e5c

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

grails-app/services/au/org/ala/biocache/hubs/PostProcessingService.groovy

-11
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ class PostProcessingService {
422422
//log.debug "record = ${record as JSON}"
423423
String stateProvince = ""
424424
String stateKey = ""
425-
Map statesListsPaths = grailsApplication.config.getProperty('stateConservationListPath', Map, [:])
426425
// conservation list is state based, so first we need to know the state
427426
modifiedRecord.get("Location")?.each {
428427
if (it.name == "stateProvince") {
@@ -431,16 +430,6 @@ class PostProcessingService {
431430
stateKey = WordUtils.capitalizeFully(stateProvince).replaceAll("\\s+", "")
432431
}
433432
}
434-
modifiedRecord.get("Occurrence")?.each {
435-
if (it.name == "stateConservation" && stateProvince && statesListsPaths.containsKey(stateKey)) {
436-
String statusValue = it.processed ?: it.raw
437-
List statusValues = statusValue.tokenize(",").unique( false ) // remove duplicate values
438-
statusValue = (statusValues.size() == 2) ? statusValues[1] : statusValues.join(", ") // only show 'sourceStatus' if 2 values are present
439-
440-
String specieslistUrl = "${grailsApplication.config.getProperty('speciesList.baseURL')}${statesListsPaths[stateKey]}"
441-
it.processed = "<a href=\"${specieslistUrl}\" target=\"_lists\">${stateProvince}: ${statusValue}</a>"
442-
}
443-
}
444433

445434
modifiedRecord
446435
}

0 commit comments

Comments
 (0)