Commit 49b185da authored by Piotr Gawron's avatar Piotr Gawron
Browse files

proper project instance is used in rest API search calls

parent 619e9b96
......@@ -3,6 +3,8 @@ minerva (12.2.2) stable; urgency=medium
with different id than default map was accessed
* Bug fix: change of owner of the data overlay in admin panel incorrectly
ordered overlays (#777)
* Bug fix: chemical search didn't use updated disease identifier, original
disease id from project upload was used instead (#779)
minerva (12.2.1) stable; urgency=medium
* Bug fix: export of reaction colorsi in SBML is properly encoded (COPASI can
......
......@@ -58,7 +58,7 @@ public class ChemicalRestImpl extends BaseRestImpl {
if (model == null) {
throw new QueryException("Project with given id doesn't exist");
}
Project project = model.getProject();
Project project = getProjectService().getProjectByProjectId(projectId, token);
if (project.getDisease() == null) {
throw new QueryException("Project doesn't have disease associated to it");
}
......@@ -175,7 +175,7 @@ public class ChemicalRestImpl extends BaseRestImpl {
if (model == null) {
throw new QueryException("Project with given id doesn't exist");
}
Project project = model.getProject();
Project project = getProjectService().getProjectByProjectId(projectId, token);
if (project.getDisease() == null) {
throw new QueryException("Project doesn't have disease associated to it");
......
......@@ -54,7 +54,7 @@ public class DrugRestImpl extends BaseRestImpl {
if (model == null) {
throw new QueryException("Project with given id doesn't exist");
}
Project project = model.getProject();
Project project = getProjectService().getProjectByProjectId(projectId, token);
Set<String> columnSet = createDrugColumnSet(columns);
......@@ -160,7 +160,7 @@ public class DrugRestImpl extends BaseRestImpl {
if (model == null) {
throw new QueryException("Project with given id doesn't exist");
}
Project project = model.getProject();
Project project = getProjectService().getProjectByProjectId(projectId, token);
List<Model> models = getModels(projectId, "*", token);
......
......@@ -53,7 +53,7 @@ public class MiRnaRestImpl extends BaseRestImpl {
if (model == null) {
throw new QueryException("Project with given id doesn't exist");
}
Project project = model.getProject();
Project project = getProjectService().getProjectByProjectId(projectId, token);
Set<String> columnSet = createMiRnaColumnSet(columns);
......@@ -129,7 +129,7 @@ public class MiRnaRestImpl extends BaseRestImpl {
if (model == null) {
throw new QueryException("Project with given id doesn't exist");
}
Project project = model.getProject();
Project project = getProjectService().getProjectByProjectId(projectId, token);
List<Model> models = getModels(projectId, "*", token);
......
Markdown is supported
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