mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Fix bug relating no PurchaseOrderLineItem with null Part reference
This commit is contained in:
		| @@ -747,7 +747,14 @@ class PurchaseOrderLineItem(OrderLineItem): | |||||||
|     ) |     ) | ||||||
|  |  | ||||||
|     def get_base_part(self): |     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 |             return self.part.part | ||||||
|  |  | ||||||
|     # TODO - Function callback for when the SupplierPart is deleted? |     # TODO - Function callback for when the SupplierPart is deleted? | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user