Open lukonjun opened 12 months ago
I get a similar error, and it appears that the reason is that the function returns a list, when the model demands a dictionary:
pydantic_core._pydantic_core.ValidationError: 2 validation errors for ReplicationPolicy filters.0.value Input should be a valid dictionary [type=dict_type, input_value='**/hello-world', input_type=str] For further information visit https://errors.pydantic.dev/2.5/v/dict_type filters.1.value Input should be a valid dictionary [type=dict_type, input_value='**', input_type=str] For further information visit https://errors.pydantic.dev/2.5/v/dict_type
It seems that both of these should be wrapped in a list, but they themselves should be dictionaries. I'm assuming this is an error with Harbor rather than the API, but it would be nice if it could be fixed somehow
I've found the issue. In harborapi/models/model.py on line 493, it shows that "value" in the ReplicationFilter class is expecting a dictionary, but it's stored as a string. Editing this line to expect a string fixes the issue for me. Can this be tested and implemented please?
Hi, when running get_replication_policies I run into an error
This is the code I use
Any advice how to fix this, is this an api incompability with the client? I am using harbor version v2.9.0