mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
remove coverage from parts migrations
This commit is contained in:
parent
3ed836f19d
commit
10170b5466
@ -11,7 +11,7 @@ import InvenTree.validators
|
||||
import part.models
|
||||
|
||||
|
||||
def attach_file(instance, filename):
|
||||
def attach_file(instance, filename): # pragma: no cover
|
||||
"""
|
||||
Generate a filename for the uploaded attachment.
|
||||
|
||||
|
@ -10,7 +10,7 @@ def update_tree(apps, schema_editor):
|
||||
Part.objects.rebuild()
|
||||
|
||||
|
||||
def nupdate_tree(apps, schema_editor):
|
||||
def nupdate_tree(apps, schema_editor): # pragma: no cover
|
||||
pass
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ def migrate_currencies(apps, schema_editor):
|
||||
|
||||
remap = {}
|
||||
|
||||
for index, row in enumerate(results):
|
||||
for index, row in enumerate(results): # pragma: no cover
|
||||
pk, suffix, description = row
|
||||
|
||||
suffix = suffix.strip().upper()
|
||||
@ -57,7 +57,7 @@ def migrate_currencies(apps, schema_editor):
|
||||
|
||||
count = 0
|
||||
|
||||
for index, row in enumerate(results):
|
||||
for index, row in enumerate(results): # pragma: no cover
|
||||
pk, cost, currency_id, price, price_currency = row
|
||||
|
||||
# Copy the 'cost' field across to the 'price' field
|
||||
@ -71,10 +71,10 @@ def migrate_currencies(apps, schema_editor):
|
||||
|
||||
count += 1
|
||||
|
||||
if count > 0:
|
||||
if count > 0: # pragma: no cover
|
||||
print(f"Updated {count} SupplierPriceBreak rows")
|
||||
|
||||
def reverse_currencies(apps, schema_editor):
|
||||
def reverse_currencies(apps, schema_editor): # pragma: no cover
|
||||
"""
|
||||
Reverse the "update" process.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user