Skip to content
Snippets Groups Projects
Commit a7fed601 authored by Mike McKay's avatar Mike McKay
Browse files

XNAT-4404, XNAT-4258 An earlier hacky fix for XNAT-4258 was causing a simple...

XNAT-4404, XNAT-4258 An earlier hacky fix for XNAT-4258 was causing a simple project PUT REST call to fail. I removed the hack and replaced it with a fix to the original problem, which was that some of the logic had changed in ProjectResource when variable names were changed.
parent a5476939
No related branches found
No related tags found
No related merge requests found
......@@ -132,12 +132,6 @@ public class ProjectResource extends ItemResource {
if (project == null || Permissions.canEdit(user, project)) {
XFTItem item = loadItem("xnat:projectData", true);
//Hacky fix. Something changed so that loadItem no longer produces null when handlePut expects it to.
// This fix nulls the item to allow the project item to be stored in the item object.
if(item!=null && item.toString().equals("<XFTItem name=\"xnat:projectData\"/>\r\n")){
item=null;
}
if (item == null) {
String xsiType = getQueryVariable("xsiType");
if (xsiType != null) {
......@@ -166,8 +160,8 @@ public class ProjectResource extends ItemResource {
if (filepath != null && !filepath.equals("")) {
if (project.getId() == null) {
item = project.getItem();
this.project = project;
item = this.project.getItem();
project = this.project;
}
if (!Permissions.canEdit(user, item)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment