Skip to content

Commit

Permalink
fixed problem with null annotations on swc export
Browse files Browse the repository at this point in the history
  • Loading branch information
olbris committed Jan 30, 2024
1 parent 76a4d46 commit a5ba028
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ public static void exportNotes(String swcPath, Long workspaceID, double[] offset
ArrayNode notesNode = mapper.createArrayNode();
for (Long annID: neuron.getStructuredTextAnnotationMap().keySet()) {
TmGeoAnnotation ann = neuron.getGeoAnnotationMap().get(annID);
if (ann == null) {
// occasionally an annotation doesn't get deleted when its annotation does;
// ignore them
continue;
}
TmStructuredTextAnnotation textAnnotation = neuron.getStructuredTextAnnotationMap().get(annID);
JsonNode jsonNode = textAnnotation.getData().path("note");
if (!jsonNode.isMissingNode()) {
Expand Down

0 comments on commit a5ba028

Please sign in to comment.