1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

More WEI tests, > 97 % coverage

This commit is contained in:
Yohann D'ANELLO
2020-08-11 13:30:44 +02:00
parent 106e97f5df
commit 71f6436d06
4 changed files with 270 additions and 63 deletions

View File

@ -25,9 +25,7 @@ class WEISurveyInformation:
If the algorithm ran, return the prefered bus according to the survey.
In the other case, return None.
"""
if not self.valid:
return None
return Bus.objects.get(pk=self.selected_bus_pk)
return Bus.objects.get(pk=self.selected_bus_pk) if self.valid else None
def save(self, registration) -> None:
"""