Skip to content

[bug] ListResponse does not impose to have totalResults #88

@LasneF

Description

@LasneF

as of today for /schemas , the current models requires to have totalResults set

otherwise it complains about

  File "D:\tools\python3.10\lib\site-packages\scim2_models\rfc7644\list_response.py", line 117, in check_results_number
    if obj.total_results > 0 and not obj.resources:
TypeError: '>' not supported between instances of 'NoneType' and 'int'

the specification is a bit more complex , totalResult is mandatory only when it is subject to filter , as a show case all request no subject to filtering such as /Schema , totalResults is not mandatory

all sample in the specification follows this rules cf
https://datatracker.ietf.org/doc/html/rfc7643#section-8.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions