MattParr / python-atws

Autotask Web Services python module
MIT License
32 stars 10 forks source link

SQL #43

Closed mcl12345 closed 6 years ago

mcl12345 commented 6 years ago

When I do : query = atws.Query('Account') query.WHERE('id', query.GreaterThan, 0) query.Bracket('AND') query.OR('Status', query.Equals, at.picklist['Ticket']['Status']['Complete']) query.OR('IssueType', query.Equals, at.picklist['Ticket']['IssueType']['Non Work Issues']) query.CloseBracket()

I have this error : Traceback (most recent call last): File "test2.py", line 36, in query.Bracket('AND') AttributeError: 'Query' object has no attribute 'Bracket'

Someone can help ?

MattParr commented 6 years ago

python-atws/atws/query.py was refactored some time ago in commit 7761fb3ac128ddb8c7c2dcad972b6a43f07e7b4b and since then, the documentation has been wrong. I've fixed up the documentation.

mcl12345 commented 6 years ago

So it's : query.open_bracket('AND') ?

The documentation didn't change : https://atws.readthedocs.io/usage.html#querying-for-entities

MattParr commented 6 years ago

The documentation did change I think you just need to refresh.

Regardless, yes that is the correct method to call open_bracket('AND')

mcl12345 commented 6 years ago

Ok, yes I needed to delete cache in the browser.