fix bug with subtitle for inaccessible dynamic locations
This commit is contained in:
parent
399ac98c1c
commit
371e095c90
1 changed files with 3 additions and 1 deletions
|
@ -475,7 +475,9 @@ class DynamicLocationPositionViewSet(UpdateModelMixin, RetrieveModelMixin, Gener
|
|||
if slug.startswith('p:'):
|
||||
return get_object_or_404(Position, secret=slug[2:])
|
||||
if slug.isdigit():
|
||||
return get_object_or_404(DynamicLocation, pk=slug)
|
||||
location = get_location_by_id_for_request(slug, self.request)
|
||||
if isinstance(location, DynamicLocation):
|
||||
return location
|
||||
raise Http404
|
||||
|
||||
@api_stats('dynamic_location_retrieve')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue