mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix bug relating no PurchaseOrderLineItem with null Part reference
This commit is contained in:
parent
4b6ca548b6
commit
6a995042c9
@ -747,7 +747,14 @@ class PurchaseOrderLineItem(OrderLineItem):
|
||||
)
|
||||
|
||||
def get_base_part(self):
|
||||
""" Return the base-part for the line item """
|
||||
"""
|
||||
Return the base part.Part object for the line item
|
||||
|
||||
Note: Returns None if the SupplierPart is not set!
|
||||
"""
|
||||
if self.part is None:
|
||||
return None
|
||||
else:
|
||||
return self.part.part
|
||||
|
||||
# TODO - Function callback for when the SupplierPart is deleted?
|
||||
|
Loading…
Reference in New Issue
Block a user