ServiceNow / PySNC

Python API for ServiceNow
MIT License
91 stars 28 forks source link

Attachments Get is Broken #75

Closed brolewis closed 1 year ago

brolewis commented 1 year ago
attachment = self.client.Attachment(raw_case["sys_class_name"])
attachment.get(raw_case["sys_id"])
image
brolewis commented 1 year ago

The error line should probably be

response = self._client.attachment_api.get(sys_id)
brolewis commented 1 year ago

Also, of note, this is a change in the API behavior that I did not see documented anywhere since the class no longer accepts sys_id.

vetsin commented 1 year ago

@brolewis sorry about that, that's pretty annoying of me to change. I'll add the right tests and fix asap.

Do you want me to keep the older behavior? it's inconsistent with everything else but does no harm

brolewis commented 1 year ago

@vetsin As long as I know the right way to do it, I'm fine with the get method, and honestly that makes sense to go that route, as long as it works :)