From fb966e37c43615be218de532842449992a8a09ea Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 22 Jul 2024 03:05:06 -0300 Subject: [PATCH] Fixed issue with working copy not being returned from /api/records/{metadataUuid}/formatters/{formatterId:.+} (#8269) This affect PDF exports on working copies. --- .../org/fao/geonet/api/records/formatters/FormatterApi.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java b/services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java index 1a9830c3ef6..068c63f60c7 100644 --- a/services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java +++ b/services/src/main/java/org/fao/geonet/api/records/formatters/FormatterApi.java @@ -252,7 +252,7 @@ public void getRecordFormattedBy( language = isoLanguagesMapper.iso639_2T_to_iso639_2B(locale.getISO3Language()); } - AbstractMetadata metadata = ApiUtils.canViewRecord(metadataUuid, servletRequest); + AbstractMetadata metadata = ApiUtils.canViewRecord(metadataUuid, approved, servletRequest); if (approved) { metadata = ApplicationContextHolder.get().getBean(MetadataRepository.class).findOneByUuid(metadataUuid);