Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Commit 05fc8ca9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

not null on data overlay caused issues on failure

parent 56161f4c
Pipeline #43386 passed with stage
in 18 minutes and 42 seconds
......@@ -24,6 +24,8 @@ minerva (16.0.0~beta.1) stable; urgency=medium
#1496)
* Bug fix: chrome autofill is disabled for "Search: " in admin panel tables
* Bug fix: top map was not selected properly sometimes (#1487)
* Bug fix: data overlays in comlex upload prevented error to be propagated
to user (#1499)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 9 Jun 2021 15:00:00 +0200
......
......@@ -52,7 +52,8 @@ import lcsb.mapviewer.services.overlay.AnnotatedObjectTreeRow;
import lcsb.mapviewer.services.search.chemical.IChemicalService;
import lcsb.mapviewer.services.search.drug.IDrugService;
import lcsb.mapviewer.services.search.mirna.IMiRNAService;
import lcsb.mapviewer.services.utils.*;
import lcsb.mapviewer.services.utils.CreateProjectParams;
import lcsb.mapviewer.services.utils.EmailSender;
import lcsb.mapviewer.services.utils.data.BuildInBackgrounds;
/**
......@@ -257,7 +258,9 @@ public class ProjectService implements IProjectService {
projectBackgroundDao.delete(background);
} catch (IOException e) {
logger.error(
"Problem with removing directory for background: " + background.getId() + "; " + background.getName(), e);
"Problem with removing directory for background: " + background.getId() + "; "
+ background.getName(),
e);
}
}
email = project.getNotifyEmail();
......@@ -395,6 +398,7 @@ public class ProjectService implements IProjectService {
handleHibernateExceptionReporting(params, e);
} catch (Exception e) {
outOfMemoryBuffer = null;
project.getDataOverlays().clear();
handleCreateProjectException(params, e);
} catch (OutOfMemoryError oome) {
// release some memory
......@@ -736,7 +740,7 @@ public class ProjectService implements IProjectService {
}
ProjectFactory projectFactory = new ProjectFactory(parser);
projectFactory.create(complexParams, dbProject);
for (DataOverlay overlay: dbProject.getDataOverlays()) {
for (DataOverlay overlay : dbProject.getDataOverlays()) {
overlay.setCreator(params.getUser());
}
} catch (IOException e) {
......@@ -832,7 +836,8 @@ public class ProjectService implements IProjectService {
ProjectBackground semanticOverlay = semanticLevelOverlays.get(i);
directory = params.getProjectDir() + "/" + buildInBackground.getDirectorySuffix() + "-" + i + "-"
+ submodelId + "/";
semanticOverlay.addProjectBackgroundImageLayer(new ProjectBackgroundImageLayer(connection.getSubmodel(), directory));
semanticOverlay
.addProjectBackgroundImageLayer(new ProjectBackgroundImageLayer(connection.getSubmodel(), directory));
}
}
submodelId++;
......
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