Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
730167b1
Commit
730167b1
authored
7 years ago
by
Todd Dembrey
Browse files
Options
Downloads
Patches
Plain Diff
Add extra fields to the index
parent
c20d00bf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/apply/funds/models.py
+6
-2
6 additions, 2 deletions
opentech/apply/funds/models.py
with
6 additions
and
2 deletions
opentech/apply/funds/models.py
+
6
−
2
View file @
730167b1
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment