mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-06 18:31:16 +00:00
Prevent AttributeError from being thrown
Ref: https://github.com/inventree/InvenTree/issues/2587
This commit is contained in:
1 parent
dd3ac58f38
commit
ea1f1b398e
1 file changed
+1
-1
@@ -43,7 +43,7 @@ def extract_purchase_price(apps, schema_editor):
|
|||||||
if lines.exists():
|
if lines.exists():
|
||||||
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line.purchase_price is not None:
|
if getattr(line, 'purchase_price', None) is not None:
|
||||||
|
|
||||||
# Copy pricing information across
|
# Copy pricing information across
|
||||||
item.purchase_price = line.purchase_price
|
item.purchase_price = line.purchase_price
|
||||||
|
|||||||
Reference in new issue
Block a user