Skip to content

Conversation

@rbw
Copy link
Owner

@rbw rbw commented Mar 6, 2021

Adds support for passing target as string:

updated = resource.update("1c741bd70b2322007518478d83673af3", {"short_description": "test"})
print(updated["short_description"])

Selection using a dict-type query or the QueryBuilder still works:

updated = resource.update({"number": "INC012345"}, {"short_description": "test"})
print(updated["short_description"])

This also changes the Resource.update() to use the PATCH method instead of PUT, as some ServiceNow APIs don't support PUT. These methods behave the same in ServiceNow nowadays, i.e. this should be a non-breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update a change request record using pysnow.response.Response update() fails.

2 participants