Commit 3a7d11f2 authored by Rafal's avatar Rafal

work

parent 6f6e376c
......@@ -52,7 +52,8 @@ class UuidBeaconViewSet(APIView):
except ObjectDoesNotExist:
return Response(status=rest_framework.status.HTTP_400_BAD_REQUEST, data={"This category is not exist"})
try:
site = beacon_manager.sites.Category.objects.get(category=category)
site = beacon_manager.sites.get(category=category)
except ObjectDoesNotExist:
return Response(status=rest_framework.status.HTTP_400_BAD_REQUEST, data={"Any link do not have this category"})
serializer = SiteSerializer(site, context={'request': request})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment