Skip to content

Commit f88a09b

Browse files
committed
Fix search again
1 parent 4afd086 commit f88a09b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

readthedocs/core/management/commands/reindex_elasticsearch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def handle(self, *args, **options):
5454
update_search(
5555
version.pk,
5656
commit,
57-
doctype=project.documentation_type,
57+
doctype=version.project.documentation_type,
5858
delete_non_commit_files=False
5959
)
6060
except Exception as e:

readthedocs/projects/tasks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ def update_app_instances(self, html=False, localmedia=False, search=False,
689689
callback=sync_callback.s(
690690
version_pk=self.version.pk,
691691
commit=self.build['commit'],
692+
doctype=self.config.doctype,
692693
),
693694
)
694695

@@ -1313,14 +1314,14 @@ def clear_artifacts(paths):
13131314

13141315

13151316
@app.task(queue='web')
1316-
def sync_callback(_, version_pk, commit, *args, **kwargs):
1317+
def sync_callback(_, version_pk, commit, doctype, *args, **kwargs):
13171318
"""
13181319
Called once the sync_files tasks are done.
13191320
13201321
The first argument is the result from previous tasks, which we discard.
13211322
"""
13221323
fileify(version_pk, commit=commit)
1323-
update_search(version_pk, commit=commit)
1324+
update_search(version_pk, commit=commit, doctype=doctype)
13241325

13251326

13261327
@app.task()

0 commit comments

Comments
 (0)