avoid error when no report is found

This commit is contained in:
Helmut Merz 2015-06-12 07:20:01 +02:00
parent 6b09ed2f9f
commit 5bf2906c51

View file

@ -184,6 +184,7 @@ class ResultsConceptView(ConceptView):
if not reports: if not reports:
type = self.context.conceptType type = self.context.conceptType
reports = type.getParents([self.hasReportPredicate]) reports = type.getParents([self.hasReportPredicate])
if reports:
return adapted(reports[0]) return adapted(reports[0])
@Lazy @Lazy