Closed lmaojs closed 10 years ago
I am trying to fetch an INC from today using this code:
from servicenow import ServiceNow from servicenow import Connection import getpass pass1 = getpass.getpass('Enter Your Password plzz! xD:') conn = Connection.Auth(username='***', password=pass1, instance='***', api='JSONv2') inc = ServiceNow.Incident(conn) grp = ServiceNow.Group(conn) inc1 = inc.fetch_one({'number': 'INC0154516'}) print inc1
but it is returning a very old INC from 2011, actually it's returning the first incident ever created in the db: 'INC010001'.
I found the bug, after last release to format the query, the Connection expects meta as a kwarg. I'l fix it soon. For now you can use:
inc.fetch_one(meta={'number': 'INC0154516'})
That will works
Fixed on 2.0.1
I am trying to fetch an INC from today using this code:
but it is returning a very old INC from 2011, actually it's returning the first incident ever created in the db: 'INC010001'.