Features: 1) Replace FeedbackDetailSerializer with FeedbackSimpleSerializer in feedback retrieval endpoint;
Fixes: none; Extra: 1) Update API documentation to reflect serializer change;
This commit is contained in:
parent
795adea793
commit
3324e5d36b
2 changed files with 2 additions and 2 deletions
|
|
@ -479,7 +479,7 @@ PRODUCT_SCHEMA = {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
responses={
|
responses={
|
||||||
status.HTTP_200_OK: FeedbackDetailSerializer(many=True),
|
status.HTTP_200_OK: FeedbackSimpleSerializer(many=True),
|
||||||
**BASE_ERRORS,
|
**BASE_ERRORS,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -585,7 +585,7 @@ class ProductViewSet(EvibesViewSet):
|
||||||
qs = Feedback.objects.filter(order_product__product=product)
|
qs = Feedback.objects.filter(order_product__product=product)
|
||||||
if not request.user.has_perm("core.view_feedback"):
|
if not request.user.has_perm("core.view_feedback"):
|
||||||
qs = qs.filter(is_active=True)
|
qs = qs.filter(is_active=True)
|
||||||
return Response(data=FeedbackDetailSerializer(qs, many=True).data)
|
return Response(data=FeedbackSimpleSerializer(qs, many=True).data)
|
||||||
|
|
||||||
@action(
|
@action(
|
||||||
detail=True,
|
detail=True,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue