From 2b2c8f3771ead6da0df362c57ecae0a0683d5ebb Mon Sep 17 00:00:00 2001 From: Jack Brinkman Date: Thu, 4 Apr 2024 10:01:57 +1000 Subject: [PATCH] Added additional data & documents check for reference records --- .../org/ala/biocollect/ReferenceAssessmentController.groovy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy index ff55649a1..db4df80c2 100644 --- a/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy +++ b/grails-app/controllers/au/org/ala/biocollect/ReferenceAssessmentController.groovy @@ -115,6 +115,12 @@ class ReferenceAssessmentController { return } + // Filter out any records without data or documents + refActivities = refActivities.findAll { + it.outputs[0].keySet().contains('data') && + it.documents.size() > 0 + } + // Filter out reference activities by the supplied vegetation structure groups & climate groups refActivities = refActivities.findAll { body["vegetationStructureGroups"].contains(it.outputs[0].data["vegetationStructureGroup"]) &&