avoid error when no report assigned

This commit is contained in:
Helmut Merz 2015-06-17 16:28:44 +02:00
parent 6b09ed2f9f
commit 14242e77c7

View file

@ -184,7 +184,8 @@ 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])
return adapted(reports[0]) if reports:
return adapted(reports[0])
@Lazy @Lazy
def reportInstance(self): def reportInstance(self):