-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Description of the problem
Similar problem to #2186; when using data_source=1 (i.e. configuration data external), Group entity (a.k.a. Team Categories) is created without externalid when using api endpoint /api/v4/contests/{cid}/groups.
Your environment
DOMjudge 8.3.0DEV/30f885875
Steps to reproduce
- set data_source to 1 (configuration data external)
- make API call
curl -XPOST https://domserver/api/v4/contests/demo/groups -Fname=demo -Ficpc_id=1234
Expected behaviour
External id can be set via API call or is automatically created. Like in the Teams entity, id attribute could be included in the API call:
curl -XPOST https://domserver/api/v4/contests/demo/groups -Fid=1234 -Fname=demo -Ficpc_id=1234 and that should set the external id if using configuration data external mode.
{"hidden":false,"id":1234,"icpc_id":"1234","name":"test","sortorder":0,"color":null,"allow_self_registration":false}
Actual behaviour
API call returns:
{"hidden":false,"id":null,"icpc_id":"1234","name":"test","sortorder":0,"color":null,"allow_self_registration":false}
No external id for the entity is created and the configuration checker shows an error "Team category XY does not have an external ID" which needs to be fixed by manually editing all entities via GUI.