Skip to content

Department Query Parameter causes 422 #62

@AwesomeDude091

Description

@AwesomeDude091

When submitting a request to /api/v1/unit/list with the department query parameter, a 422 with following error message is returned.

{
  "detail": [
    {
      "type": "enum",
      "loc": [
        "query",
        "department"
      ],
      "msg": "Input should be 1, 2, 3, 5, 7, 8, 9, 11, 13, 17, 18, 19, 20, 23, 24 or 25",
      "input": "11",
      "ctx": {
        "expected": "1, 2, 3, 5, 7, 8, 9, 11, 13, 17, 18, 19, 20, 23, 24 or 25"
      }
    }
  ]
}

My suspicion is that the input isn't being converted to an integer (as it is a string above), therefore causing the fault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions