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