Skip to content
Snippets Groups Projects
Commit af1a1f15 authored by srosse's avatar srosse
Browse files

OO-2641: fix NPE if the portfolio is missing

parent 15263062
No related branches found
No related tags found
No related merge requests found
......@@ -94,8 +94,10 @@ public class PortfolioCourseNodeIndexer extends DefaultIndexer implements Course
if(repoEntry != null) {
OLATResource ores = repoEntry.getOlatResource();
PortfolioStructure element = structureManager.loadPortfolioStructure(ores);
Document pDocument = PortfolioMapDocument.createDocument(courseNodeResourceContext, element);
indexWriter.addDocument(pDocument);
if(element != null) {
Document pDocument = PortfolioMapDocument.createDocument(courseNodeResourceContext, element);
indexWriter.addDocument(pDocument);
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment