orders: change order list api
This commit is contained in:
@@ -6,7 +6,7 @@ from core.apps.orders.views import party as party_views
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('order/', include( [
|
||||
path('order/', include([
|
||||
path('list/', order_views.OrderListApiView.as_view()),
|
||||
path('create/', order_views.OrderCreateApiView.as_view()),
|
||||
path('<uuid:id>/update/', order_views.OrderUpdateApiView.as_view()),
|
||||
|
||||
@@ -17,7 +17,7 @@ class OrderListApiView(generics.ListAPIView):
|
||||
serializer_class = serializers.OrderListSerializer
|
||||
queryset = Order.objects.select_related(
|
||||
'product', 'unity', 'project', 'project_folder', 'wherehouse'
|
||||
)
|
||||
).filter(type='order')
|
||||
permission_classes = [HasRolePermission]
|
||||
pagination_class = CustomPageNumberPagination
|
||||
filter_backends = [DjangoFilterBackend, filters.SearchFilter]
|
||||
|
||||
Reference in New Issue
Block a user