mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-31 12:11:49 +00:00
Bugfix: avoid error upon getting succesfully cancelled order
This commit is contained in:
@ -225,13 +225,13 @@ class OrderView(viewsets.ViewSet):
|
|||||||
# 2) If order has been cancelled
|
# 2) If order has been cancelled
|
||||||
if order.status == Order.Status.UCA:
|
if order.status == Order.Status.UCA:
|
||||||
return Response(
|
return Response(
|
||||||
{"bad_request": "This order has been cancelled by the maker"},
|
{"status": "This order has been cancelled by the maker"},
|
||||||
status.HTTP_400_BAD_REQUEST,
|
status.HTTP_204_NO_CONTENT,
|
||||||
)
|
)
|
||||||
if order.status == Order.Status.CCA:
|
if order.status == Order.Status.CCA:
|
||||||
return Response(
|
return Response(
|
||||||
{"bad_request": "This order has been cancelled collaborativelly"},
|
{"status": "This order has been cancelled collaborativelly"},
|
||||||
status.HTTP_400_BAD_REQUEST,
|
status.HTTP_204_NO_CONTENT,
|
||||||
)
|
)
|
||||||
|
|
||||||
data = ListOrderSerializer(order).data
|
data = ListOrderSerializer(order).data
|
||||||
|
Reference in New Issue
Block a user