Skip to content

Commit

Permalink
Merge branch 'EA-3925-issue-itemDescriptions-profile' of https://gith…
Browse files Browse the repository at this point in the history
…ub.com/europeana/set-api.git into EA-3925-issue-itemDescriptions-profile
  • Loading branch information
SrdjanStevanetic committed Sep 11, 2024
2 parents e167a0f + 9410be2 commit c5084b5
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,9 @@ private List<String> reorderItemDescriptions(UserSet userSet, List<String> itemD
UserSetUtils.extractItemIdentifier(itemUri, getConfiguration().getItemDataEndpoint());
// escape "/" to "\/" to match json string
localId = StringUtils.replace(localId, "/", "\\/");
String idWithSpace="\"id\": \"" + localId + '"';
for (String description : itemDescriptions) {
String idWithoutSpace="\"id\":" + "\"" + localId + "\"";
String idWithSpace="\"id\":" + " " + "\"" + localId + "\"";
if (description.contains(idWithoutSpace) || description.contains(idWithSpace)) {
if (description.contains(idWithSpace)) {
orderedItemDescriptions.add(description);
found = true;
break;
Expand Down

0 comments on commit c5084b5

Please sign in to comment.