[WEI] Run algorithm only on valid surveys
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
881cd88f48
commit
ba9ef0371a
2 changed files with 3 additions and 1 deletions
|
|
@ -28,7 +28,8 @@ class Command(BaseCommand):
|
|||
|
||||
output = options['output']
|
||||
registrations = algorithm.get_registrations()
|
||||
per_bus = {bus: [r for r in registrations if r.information['selected_bus_pk'] == bus.pk]
|
||||
per_bus = {bus: [r for r in registrations if 'selected_bus_pk' in r.information
|
||||
and r.information['selected_bus_pk'] == bus.pk]
|
||||
for bus in algorithm.get_buses()}
|
||||
for bus, members in per_bus.items():
|
||||
output.write(bus.name + "\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue