ServiceNow / PySNC

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

inconsistent get behavior #59

Open vetsin opened 1 year ago

vetsin commented 1 year ago

When doing something as such:

gr = client.GlideRecord(table)
gr.initialize()
gr.field = 'some value'
gr.get('non_existant_id')

We expect the gr.field to now be None -- in actuality it is still some value as the failed get() did not update _current.

Actual GlideRecord behaves in this matter:

let gr = new GlideRecord('incident')
gr.initialize()
gr.short_description = 'this is a test'
gs.info(gr.short_description)
gr.get('sys_id')
gs.info(gr.short_description)

will give us

my_scope: this is a test
my_scope: