mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
only print if models found
This commit is contained in:
parent
f1ee206c53
commit
6319beb14e
@ -15,6 +15,8 @@ def _convert_model(apps, line_item_ref, extra_line_ref, price_ref):
|
||||
OrderExtraLine = apps.get_model('order', extra_line_ref)
|
||||
|
||||
items_to_change = OrderLineItem.objects.filter(part=None)
|
||||
if items_to_change.count() == 0:
|
||||
return
|
||||
|
||||
print(f'\nFound {items_to_change.count()} old {line_item_ref} instance(s)')
|
||||
print(f'Starting to convert - currently at {OrderExtraLine.objects.all().count()} {extra_line_ref} / {OrderLineItem.objects.all().count()} {line_item_ref} instance(s)')
|
||||
|
Loading…
Reference in New Issue
Block a user