mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix for PurchaseOrderCancelSerializer (#7943)
- Fix duplication of "self.order" property
This commit is contained in:
parent
e837e5d7d7
commit
7709d8df70
@ -319,12 +319,6 @@ class PurchaseOrderHoldSerializer(OrderAdjustSerializer):
|
|||||||
class PurchaseOrderCancelSerializer(OrderAdjustSerializer):
|
class PurchaseOrderCancelSerializer(OrderAdjustSerializer):
|
||||||
"""Serializer for cancelling a PurchaseOrder."""
|
"""Serializer for cancelling a PurchaseOrder."""
|
||||||
|
|
||||||
def get_context_data(self):
|
|
||||||
"""Return custom context information about the order."""
|
|
||||||
self.order = self.context['order']
|
|
||||||
|
|
||||||
return {'can_cancel': self.order.can_cancel}
|
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
"""Save the serializer to 'cancel' the order."""
|
"""Save the serializer to 'cancel' the order."""
|
||||||
if not self.order.can_cancel:
|
if not self.order.can_cancel:
|
||||||
|
Loading…
Reference in New Issue
Block a user