Commit 8197cdd2 authored by Matija Obreza's avatar Matija Obreza

Fix: `climate TileClimate` may not exist, needs reset to null

- TBD see if jackson-hibernate can ignore such errors
parent 22832f74
......@@ -128,8 +128,13 @@ public class AccessionServiceImpl implements AccessionService {
}
if (accessionId.getGeo() != null) {
accessionId.getGeo().getId();
if (accessionId.getGeo().getClimate() != null) {
accessionId.getGeo().getClimate().getTileIndex();
if (accessionId.getGeo().getTileIndex() != null) {
try {
accessionId.getGeo().getClimate().getTileIndex();
} catch (Throwable e) {
LOG.debug("Climate for tile does not exist. tileIndex=" + accessionId.getGeo().getTileIndex());
accessionId.getGeo().setClimate(null);
}
}
}
......
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