Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-09-27 13:59:43 +02:00
parent ac8453b04c
commit d437f2bdbd
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
2 changed files with 5 additions and 4 deletions

View File

@ -290,4 +290,4 @@ class WEISurveyAlgorithm2021(WEISurveyAlgorithm):
if tqdm_obj is not None: if tqdm_obj is not None:
tqdm_obj.n = len(surveys) - len(free_surveys) tqdm_obj.n = len(surveys) - len(free_surveys)
tqdm_obj.refresh() tqdm_obj.refresh()

View File

@ -27,6 +27,7 @@ class Command(BaseCommand):
try: try:
from tqdm import tqdm from tqdm import tqdm
del tqdm
display_tqdm = True display_tqdm = True
except ImportError: except ImportError:
display_tqdm = False display_tqdm = False
@ -41,13 +42,13 @@ class Command(BaseCommand):
for bus, members in per_bus.items(): for bus, members in per_bus.items():
output.write(bus.name + "\n") output.write(bus.name + "\n")
output.write("=" * len(bus.name) + "\n") output.write("=" * len(bus.name) + "\n")
order = -1 _order = -1
for r in members: for r in members:
survey = CurrentSurvey(r) survey = CurrentSurvey(r)
for order, (b, _score) in enumerate(survey.ordered_buses()): for _order, (b, _score) in enumerate(survey.ordered_buses()):
if b == bus: if b == bus:
break break
output.write(f"{r.user.username} ({order + 1})\n") output.write(f"{r.user.username} ({_order + 1})\n")
output.write("\n") output.write("\n")
if not options['doit']: if not options['doit']: