add condition for preparing agenda and protocol

This commit is contained in:
2022-05-04 13:53:58 +00:00
parent a24acd91c9
commit 2cca4d99c0

View File

@@ -28,11 +28,11 @@ class PostIndex(indexes.SearchIndex, indexes.Indexable):
return obj.event_start.date()
def prepare_agenda(self, obj):
if obj.has_agenda:
if obj.has_agenda and not obj.agenda_html:
return html2text(obj.agenda_html)
return None
def prepare_protocol(self, obj):
if obj.has_protocol:
if obj.has_protocol and not obj.protocol_html:
return html2text(obj.protocol_html)
return None