def update_item(name, id_, field=None, value=None, postdata=None):
 if (field and value):
  if postdata:
   raise SaltInvocationError('Either a field and a value, or a chunk of POST data, may be specified, but not both.')
  postdata = {name.title(): {field: value}}
 if (postdata is None):
  raise SaltInvocationError('Either a field and a value, or a chunk of POST data must be specified.')
 (status, result) = _query(action=name, command=id_, method='POST', data=json.dumps(postdata))
 return result

def update_item ( name , id_ , field = None , value = None , postdata = None ) : if ( field and value ) : if postdata : raise SaltInvocationError ( 'Either a field and a value, or a chunk of POST data, may be specified, but not both.' ) postdata = { name . title ( ) : { field : value } } if ( postdata is None ) : raise SaltInvocationError ( 'Either a field and a value, or a chunk of POST data must be specified.' ) ( status , result ) = _query ( action = name , command = id_ , method = 'POST' , data = json . dumps ( postdata ) ) return result
update an item .