|
@@ -10,11 +10,11 @@ class TicketPatchAPIView(generics.UpdateAPIView):
|
|
|
API для частичного обновления тикета
|
|
|
"""
|
|
|
|
|
|
+ queryset = Ticket.objects.all()
|
|
|
serializer_class = TicketSerializer
|
|
|
permission_classes = [
|
|
|
permissions.IsAuthenticated | HasAPIKey
|
|
|
]
|
|
|
- queryset = Ticket.objects.all()
|
|
|
|
|
|
|
|
|
class TicketListAPIView(generics.ListAPIView):
|
|
@@ -22,9 +22,17 @@ class TicketListAPIView(generics.ListAPIView):
|
|
|
API для получения списка тикетов
|
|
|
"""
|
|
|
|
|
|
+ queryset = Ticket.objects.all()
|
|
|
serializer_class = TicketSerializer
|
|
|
permission_classes = [
|
|
|
permissions.IsAuthenticated | HasAPIKey
|
|
|
]
|
|
|
- queryset = Ticket.objects.all()
|
|
|
+ filterset_fields = (
|
|
|
+ 'title',
|
|
|
+ 'ticket_list',
|
|
|
+ 'ticket_type',
|
|
|
+ 'status',
|
|
|
+ 'created_by',
|
|
|
+ 'assigned_to',
|
|
|
+ )
|
|
|
|