pysnow
pysnow copied to clipboard
Allow passing string-type target to Resource.update
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.