From fa0e082d489b9e5c95f657da27efce7cf64dfdb8 Mon Sep 17 00:00:00 2001 From: steven choi Date: Mon, 9 Oct 2023 13:35:13 +1100 Subject: [PATCH] #790 Adding a private image on gives error --- grails-app/services/au/org/ala/profile/hub/ImageService.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grails-app/services/au/org/ala/profile/hub/ImageService.groovy b/grails-app/services/au/org/ala/profile/hub/ImageService.groovy index 2a9f50c6..816ef86b 100644 --- a/grails-app/services/au/org/ala/profile/hub/ImageService.groovy +++ b/grails-app/services/au/org/ala/profile/hub/ImageService.groovy @@ -378,7 +378,7 @@ class ImageService { response.resp.count = numberOfPublishedImages + numberOfLocalImages if (!readonlyView) { - response.resp.availImagesCount = publishedImagesMap?.resp?.totalRecords + numberOfLocalImages + response.resp.availImagesCount = (publishedImagesMap.resp?publishedImagesMap?.resp?.totalRecords:0) + numberOfLocalImages } else { response.resp.count = numberOfPublishedImages + ((numberOfIncludedLocalImages > 0)? numberOfIncludedLocalImages : 0) response.resp.availImagesCount = response.resp.count