langrenn-sprint / event-service

Backend service to adminster events, will generate racelists etc
Apache License 2.0
0 stars 0 forks source link

Tildel startnummer feiler dersom man slår saman klasser og endrer verdi for "Aldersklasser" i ny klasse #149

Closed stigbd closed 10 months ago

stigbd commented 10 months ago

Vi lasta opp alle deltakere. Genererte klasser. Fjerna så 5 deltakere. Generert kjøreplan. Gikk så til tildel startnummer. Dette feila med følgande error i backend: {"message": "coroutine raised StopIteration", "exc_info": "Traceback (most recent call last):\n File \"/app/event_service/commands/contestants_commands.py\", line 97, in assign_bibs\n c_dict[\"raceclass_group\"] = next(\n ^^^^^\nStopIteration\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/usr/local/lib/python3.11/site-packages/aiohttp_middlewares/error.py\", line 211, in middleware\n return await handler(request)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py\", line 955, in _iter\n ret = await method()\n ^^^^^^^^^^^^^^\n File \"/app/event_service/views/contestants_commands.py\", line 48, in post\n await ContestantsCommands.assign_bibs(db, event_id)\nRuntimeError: coroutine raised StopIteration", "severity": "ERROR", "serviceContext": {"service": "event-service"}}

heming-langrenn commented 10 months ago

Denne klarer jeg ikke å tolke. Klarer vi å gjenskape den?

stigbd commented 10 months ago

Eg gjer eit forsøk lokalt i morgon på å gjenskape. Så skal eg skrive ein test som genererer feilen.

stigbd commented 10 months ago

OK, då har eg forstått scenariet:

Forslag til tiltak: