Allow empty array for Resources when totalResults is non-zero#133
Allow empty array for Resources when totalResults is non-zero#133azmeuk merged 1 commit intopython-scim:mainfrom
Conversation
|
Per RFC7644 3.4.2:
What do you think is wrong with the current code? If |
|
There are two common cases where the
The main thing here is the first scenario. You can query how many resources the endpoint have without receiving the resources by setting I think that is the main reason why in the rfc the minimum value for
Resources must be set, empty array still counts. Not defining resources or setting it null is invalid. |
|
Oh. Nice catch. |
As said in the rfc and in the docstring, resources must be set if totalResults is non-zero. However, scim2-models does not accept an empty list because in Python it is considered as falsy value.
This is fixed by checking if resources is None. That's it.