Updating Existing Ticket Not Working
Closed this issue · 2 comments
Hi,
Trying to update an existing ticket in AT with the following code. When running it returns without throwing any errors however the ticket in AT does not update with the new status. When I run the code with at.update(ticket).execute() or ticket.update() the console throws an error: 'Conversion from type 'Object' to type 'String' is not valid. and Error updating entity for record number[1]
import logging
import atws
import atws.monkeypatch.attributes
from datetime import datetime
import config
def main():
at = atws.connect(username='config.user', password='config.password', support_file_path = '/tmp')
query = atws.Query('Ticket')
query.WHERE('id',query.Equals,294562)
ticket = at.query(query).fetch_one()
ticket.Status = at.picklist['Ticket']['Status']['New Alert']
at.update(ticket)
if __name__ == '__main__':
main()
Yes it does print out a valid look up. I have replied to your other message. Cheers