Skip to content

Commit

Permalink
a couple of extra fixes. #8889
Browse files Browse the repository at this point in the history
  • Loading branch information
landreev committed May 24, 2023
1 parent 82e91f2 commit 60c1031
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/edu/harvard/iq/dataverse/api/Dataverses.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ public Response deleteDataverse(@Context ContainerRequestContext crc, @PathParam
@AuthRequired
@Path("{identifier}/attribute/{attribute}")
public Response updateAttribute(@Context ContainerRequestContext crc, @PathParam("identifier") String identifier,
@PathParam("attribute") String attribute, @NotNull String value) {
@PathParam("attribute") String attribute, @QueryParam("value") String value) {
try {
Dataverse collection = findDataverseOrDie(identifier);
User user = getRequestUser(crc);
Expand Down Expand Up @@ -622,6 +622,7 @@ public Response updateAttribute(@Context ContainerRequestContext crc, @PathParam
*/
case "filePIDsEnabled":
collection.setFilePIDsEnabled(parseBooleanOrDie(value));
break;
default:
return badRequest("'" + attribute + "' is not a supported attribute");
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -2079,7 +2079,7 @@ public void testFilePIDsBehavior() {

// And confirm that the file didn't get a PID:

fileInfoResponse = UtilIT.getFileData(origFileId.toString(), apiToken);
fileInfoResponse = UtilIT.getFileData(newFileId.toString(), apiToken);
fileInfoResponse.then().assertThat().statusCode(OK.getStatusCode());
fileInfoResponseString = fileInfoResponse.body().asString();
msg(fileInfoResponseString);
Expand Down

0 comments on commit 60c1031

Please sign in to comment.