Fix migration progress output

This commit is contained in:
jeremystretch 2022-07-15 10:07:35 -04:00
parent 81761aa177
commit b075389597

View File

@ -64,6 +64,8 @@ def populate_cable_terminations(apps, schema_editor):
# Output progress occasionally
if 'test' not in sys.argv and not i % 100:
progress = float(i) * 100 / cable_count
if i == 100:
print('')
sys.stdout.write(f"\r Updated {i}/{cable_count} cables ({progress:.2f}%)")
sys.stdout.flush()