Skip to content

Commit 0f93913

Browse files
committed
Put back the other check
1 parent fa31d26 commit 0f93913

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

readthedocs/search/api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ def get_queryset(self):
124124
if not kwargs['filters']['project']:
125125
log.info("Unable to find a project to search")
126126
return HTMLFile.objects.none()
127+
if not kwargs['filters']['version']:
128+
log.info("Unable to find a version to search")
129+
return HTMLFile.objects.none()
127130
user = self.request.user
128131
queryset = PageSearch(
129132
query=query, user=user, **kwargs
@@ -157,7 +160,7 @@ def get_serializer_context(self):
157160

158161
def get_all_projects(self):
159162
"""
160-
Return a list containing the project itself and all its subprojects the user has permissions over.
163+
Return a list of the project itself and all its subprojects the user has permissions over.
161164
162165
:rtype: list
163166
"""

0 commit comments

Comments
 (0)