From 40fcfe1f475705c4f13ee891fdc4b5fed662f0bd Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 22 Jun 2021 08:53:44 +1000 Subject: [PATCH] Reduce noise in logs --- InvenTree/build/migrations/0029_auto_20210601_1525.py | 3 ++- InvenTree/company/migrations/0026_auto_20201110_1011.py | 3 ++- InvenTree/part/migrations/0056_auto_20201110_1125.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/InvenTree/build/migrations/0029_auto_20210601_1525.py b/InvenTree/build/migrations/0029_auto_20210601_1525.py index c5ea04b5c9..e8b2d58947 100644 --- a/InvenTree/build/migrations/0029_auto_20210601_1525.py +++ b/InvenTree/build/migrations/0029_auto_20210601_1525.py @@ -40,7 +40,8 @@ def assign_bom_items(apps, schema_editor): except BomItem.DoesNotExist: pass - print(f"Assigned BomItem for {count_valid}/{count_total} entries") + if count_total > 0: + print(f"Assigned BomItem for {count_valid}/{count_total} entries") def unassign_bom_items(apps, schema_editor): diff --git a/InvenTree/company/migrations/0026_auto_20201110_1011.py b/InvenTree/company/migrations/0026_auto_20201110_1011.py index c6be37b967..20ec7d2f6f 100644 --- a/InvenTree/company/migrations/0026_auto_20201110_1011.py +++ b/InvenTree/company/migrations/0026_auto_20201110_1011.py @@ -71,7 +71,8 @@ def migrate_currencies(apps, schema_editor): count += 1 - print(f"Updated {count} SupplierPriceBreak rows") + if count > 0: + print(f"Updated {count} SupplierPriceBreak rows") def reverse_currencies(apps, schema_editor): """ diff --git a/InvenTree/part/migrations/0056_auto_20201110_1125.py b/InvenTree/part/migrations/0056_auto_20201110_1125.py index b382dded71..862f9411c8 100644 --- a/InvenTree/part/migrations/0056_auto_20201110_1125.py +++ b/InvenTree/part/migrations/0056_auto_20201110_1125.py @@ -71,7 +71,8 @@ def migrate_currencies(apps, schema_editor): count += 1 - print(f"Updated {count} SupplierPriceBreak rows") + if count > 0: + print(f"Updated {count} SupplierPriceBreak rows") def reverse_currencies(apps, schema_editor): """