Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validering av kjøreplan #123

Merged
merged 1 commit into from
Dec 11, 2022

Conversation

stigbd
Copy link
Member

@stigbd stigbd commented Dec 11, 2022

Fixes #118

Validerer:

  • at race ikkje har 0 contestants
  • at races er i kronlogisk rekkefølge
  • at antall contestants i race stemmer med raceplan
  • at antall contestants stemmer med ageclasses

Når validering (POST) går bra, vil ein kunne få eit resultat som følger, dersom det fins feil. Resultat er dict, med nøkkel lik order til det enkelte race, og spesialtilfelle "0", som er feil i sjølve raceplan-objektet:

{
    "0": [
        "The sum of contestants in races (24) is not equal to the number of contestants in the raceplan (32)."
    ],
    "4": ["Start time is not in chronological order.", "Race has no contestants."],
}

Fixes #118

Validerer:
- at race ikkje har 0 contestants
- at races er i kronlogisk rekkefølge
- at antall contestants i race stemmer med raceplan
- at antall contestants stemmer med ageclasses
@stigbd stigbd merged commit 4bd5b5c into main Dec 11, 2022
@stigbd stigbd deleted the feature/stigbd/issue118-add-validate-raceplan-endpoint branch December 11, 2022 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validering på tidsdifferanser kjøreplan
1 participant