We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Connected to Zammad 5.4.0 with token and token has admin.user permission.
Trying to update user but do nothing
from zammad_py import ZammadAPI zm = ZammadAPI(url='https://xxxx.com/api/v1/', http_token='xxxx') timo = zm.user.find(4) params = {'firstname':'Timoo'} timo.update(params=params) timo = zm.user.find(4) print(timo)
Testing with curl works .
curl -H "Authorization: Token token=xxxx" https://xxxx.com/api/v1/users/4 -X PUT -H 'Content-Type: application/json' --data-binary '{"firstname": "Timoo"}'
The text was updated successfully, but these errors were encountered:
Hi, This is more of a documentation issue, specifically, because I overlooked it when I updated it.
As the zammad_py package is still basically a wrapper for the api, and doesn't provide model instances, find() will return a dict.
To update records, you need to instead do this:
`from zammad_py import ZammadAPI
zm = ZammadAPI(url='https://xxxx.com/api/v1/', http_token='xxxx')
timo = zm.user.find(4) timo['firstname'] = 'Timoo' zm.user.update(id=timo['id'],params=params)
timo = zm.user.find(4) print(timo)`
I'll update the documentation to reflect this, thanks for your feedback!
Sorry, something went wrong.
Anuril
No branches or pull requests
Description
Connected to Zammad 5.4.0 with token and token has admin.user permission.
Trying to update user but do nothing
What I Did
Testing with curl works .
The text was updated successfully, but these errors were encountered: