Location API: can_seach OR can_describe
This commit is contained in:
parent
bdbbaa71a1
commit
0cfae778f0
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ class LocationViewSet(RetrieveModelMixin, GenericViewSet):
|
|||
if mode == 'search':
|
||||
condition &= Q(**{related_name+'__can_search': True})
|
||||
elif mode == 'search-describe':
|
||||
condition &= Q(**{related_name+'__can_search': True, related_name+'__can_describe': True})
|
||||
condition &= Q(**{related_name+'__can_search': True}) | Q(**{related_name+'__can_describe': True})
|
||||
# noinspection PyUnresolvedReferences
|
||||
condition &= model.q_for_request(self.request, prefix=related_name+'__')
|
||||
conditions.append(condition)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue