From d178340c7d8b7f24758e683a9a321308c9f5d55c Mon Sep 17 00:00:00 2001 From: Ian Allen Date: Fri, 19 Jul 2024 11:56:11 -0300 Subject: [PATCH] Fixed issue with working copy not being returned from /api/records/{metadataUuid}/formatters/{formatterId:.+} 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);