add condition for preparing agenda and protocol
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user