Add unit tests for boolean user settings (via the API)

This commit is contained in:
Oliver Walters committed 2022-05-01 20:23:50 +10:00
1 parent 75fa0bed26
commit eabe082f0a
3 files changed
+100 -6

No files matched your search

@@ -17,8 +17,6 @@ def assign_bom_items(apps, schema_editor):
BuildItem = apps.get_model('build', 'builditem')
BomItem = apps.get_model('part', 'bomitem')
Part = apps.get_model('part', 'part')
logger.info("Assigning BomItems to existing BuildItem objects")
count_valid = 0
count_total = 0
@@ -29,6 +27,10 @@ def assign_bom_items(apps, schema_editor):
# Note: Before this migration, variant stock assignment was not allowed,
# so BomItem lookup should be pretty easy
if count_total == 0:
# First time around
logger.info("Assigning BomItems to existing BuildItem objects")
count_total += 1
try: