From 12d6a44262905a10ff58b0e61602f768b03cd45a Mon Sep 17 00:00:00 2001 From: milanmajchrak <90026355+milanmajchrak@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:58:16 +0100 Subject: [PATCH] Updated Utils class to parse string request from Python API (#563) * Remove double quotes from the start and end of the string - this double quotes are added when the request is called from the Python API * Removed creating and using `migrate-7.5` docker image (#565) * ufal/comment-ever-failing-test * Commented still failing tests (#490) --------- Co-authored-by: MajoBerger --- .../src/main/java/org/dspace/app/rest/utils/Utils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java b/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java index 88278b531c14..18de25a4313b 100644 --- a/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java +++ b/dspace-server-webapp/src/main/java/org/dspace/app/rest/utils/Utils.java @@ -449,6 +449,11 @@ public List constructBitstreamFormatList(HttpServletRequest req public List constructDSpaceObjectList(Context context, List list) { List dSpaceObjects = new LinkedList<>(); for (String string : list) { + // Remove double quotes from the start and end of the string - this double quotes are added when the + // request is called from the Python API + if (string.startsWith("\"") && string.endsWith("\"")) { + string = string.substring(1, string.length() - 1); + } if (string.endsWith("/")) { string = string.substring(0, string.length() - 1); }