Mark "supplier" field as required on PurchaseOrder serializer (#4693)

- Fixes https://github.com/inventree/InvenTree/issues/4687
This commit is contained in:
Oliver 2023-04-26 12:35:55 +10:00 committed by GitHub
parent 011b5915e1
commit eaa518852c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,6 +177,10 @@ class PurchaseOrderSerializer(TotalPriceMixin, AbstractOrderSerializer, InvenTre
'creation_date',
]
extra_kwargs = {
'supplier': {'required': True}
}
def __init__(self, *args, **kwargs):
"""Initialization routine for the serializer"""
supplier_detail = kwargs.pop('supplier_detail', False)