fix award unbind

This commit is contained in:
Kuroshini 2020-01-24 15:44:05 +03:00
parent 25488ca2fb
commit 5353c5a67c

View File

@ -1,7 +1,9 @@
"""Establishment app views."""
from django.shortcuts import get_object_or_404
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import generics, permissions
from rest_framework import generics, permissions, status
from rest_framework.response import Response
from account.models import User
from establishment import filters, models, serializers
@ -226,6 +228,10 @@ class RemoveAwardView(generics.DestroyAPIView):
employee.remove_award(self.kwargs['award_id'])
return employee
def delete(self, request, *args, **kwargs):
instance = self.get_object()
return Response(status=status.HTTP_204_NO_CONTENT)
class EstablishmentTypeListCreateView(generics.ListCreateAPIView):
"""Establishment type list/create view."""