Commit d43f8a3d authored by Piotr Gawron's avatar Piotr Gawron
Browse files

initialize top map (in case the project is incorrectly uploaded)

parent 8179736c
Pipeline #53145 passed with stage
in 17 minutes and 4 seconds
......@@ -10,6 +10,8 @@ minerva (16.1.0~beta.1) stable; urgency=medium
background (#1643)
* Bug fix: updated of Disease and Organism are displayed in admin panel with
`null` (#1646)
* Bug fix: uploaded project that was problematic could cause issues when
listing all projects (#1644)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 18 Feb 2022 11:00:00 +0200
......
......@@ -309,11 +309,14 @@ public class ProjectService implements IProjectService {
@Override
public List<Project> getAllProjects(final boolean initializeLazy) {
List<Project> result = getAllProjects();
for (final Project project : result) {
for (final ModelData model : project.getModels()) {
Hibernate.initialize(model);
if (initializeLazy) {
for (final Project project : result) {
for (final ModelData model : project.getModels()) {
Hibernate.initialize(model);
}
Hibernate.initialize(project.getTopModelData());
Hibernate.initialize(project.getLogEntries());
}
Hibernate.initialize(project.getLogEntries());
}
return result;
}
......
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