Skip to content

Commit

Permalink
Updated Utils class to parse string request from Python API (#563)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
milanmajchrak and MajoBerger authored Mar 22, 2024
1 parent 1bd0fec commit 12d6a44
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ public List<BitstreamFormat> constructBitstreamFormatList(HttpServletRequest req
public List<DSpaceObject> constructDSpaceObjectList(Context context, List<String> list) {
List<DSpaceObject> 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);
}
Expand Down

0 comments on commit 12d6a44

Please sign in to comment.