Skip to content
Snippets Groups Projects
Commit 730167b1 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add extra fields to the index

parent c20d00bf
No related branches found
No related tags found
No related merge requests found
......@@ -508,15 +508,19 @@ class ApplicationSubmission(WorkflowHelpers, AbstractFormSubmission):
return mark_safe(''.join(fields))
def prepare_search_values(self):
excluded_fields = ['data', 'time', 'datetime', 'value', 'category', 'number']
excluded_fields = ['data', 'time', 'datetime', 'value', 'category', 'number', 'file', 'multifile']
for data, stream in self.data_and_fields():
if stream.block_type not in excluded_fields:
if stream.block_type not in excluded_fields and data:
value = stream.block.get_searchable_content(stream.value, data)
if isinstance(value, list):
yield ', '.join(value)
else:
yield value
# Add named fields into the search index
for field in ['email', 'title']:
yield getattr(self, field)
def get_data(self):
# Updated for JSONField
form_data = self.form_data
......
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