Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Folder Tag Updating #248

Open
kzscisoft opened this issue Apr 3, 2024 · 2 comments
Open

Fix Folder Tag Updating #248

kzscisoft opened this issue Apr 3, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@kzscisoft
Copy link
Collaborator

When using set_folder_details to update the tags of an existing folder the tags are not added on the server. This was discovered when addressing #105.

client = Client()
client.set_folder_details('/path/to/folder', tags=["test_tags"])

May or may not have something to do with the fact currently the server only accepts strings not lists.

@kzscisoft kzscisoft added the bug Something isn't working label Apr 3, 2024
@alahiff
Copy link
Collaborator

alahiff commented Apr 3, 2024

May or may not have something to do with the fact currently the server only accepts strings not lists.

For folder tags? That's not true - if I try to use a string, rather than a list, I get a 422:

{"detail":[{"loc":["body","tags"],"msg":"value is not a valid list","type":"type_error.list"}]}

so it definitely wants a list rather than a string.

The API works correctly as far as I can tell, e.g.:

curl -i -X PUT -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>" \
        --data '{"id": "KsUDKULkbc3ZX5oL4DaDGM", "tags": ["tag1", "tag2", "a1"]}' \
        https://dev02.simvue.io/api/folders

@kzscisoft
Copy link
Collaborator Author

@alahiff my mistake, thanks for looking into this, must be on the client side

@kzscisoft kzscisoft self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants