Commit 05b9344d authored by Matija Obreza's avatar Matija Obreza
Browse files

Subrequest's body needs to have new PID when updated

parent b5eb2daa
......@@ -247,7 +247,18 @@ public class RequestServiceImpl implements RequestService {
RequestBody rb = mapper.readValue(materialRequest.getBody(), RequestBody.class); = pid;
// Need to update all subrequests
for (MaterialSubRequest subrequest : materialRequest.getSubRequests()) {
RequestBody rbs = mapper.readValue(subrequest.getBody(), RequestBody.class); = pid;
subrequest.setBody(serialize(rb));"Updating subrequest: " + subrequest);;
} catch (IOException e) {
// FIXME Some other exception?
throw new RuntimeException("Could not handle request JSON", e);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment