Skip to content

Commit

Permalink
Avoid duplicate call to findOneByUuid
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwallen committed Sep 29, 2023
1 parent 6f8cc7c commit 6ddb59e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/src/main/java/org/fao/geonet/api/ApiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static String getInternalId(String uuidOrInternalId, Boolean approved)
AbstractMetadata metadata = metadataUtils.findOneByUuid(uuidOrInternalId);
String id = null;
if (metadata != null) {
id = String.valueOf(metadataUtils.findOneByUuid(uuidOrInternalId).getId());
id = String.valueOf(metadata.getId());
}

if (StringUtils.isEmpty(id)) {
Expand Down

0 comments on commit 6ddb59e

Please sign in to comment.