AWS Thinkbox Discussion Forums

restAPI saveUser bug

When adding new users with the restful api, the initial call just adds the user but none of the properties. You have to call save again for all the properties to be set.

Try:

dictUser = {u'Email': u'laszlo.sebo@scanlinevfx.com',
 u'JobCompleted': True,
 u'JobFailed': True,
 u'JobTaskTimeout': True,
 u'JobWarning': True,
 u'Machine': u'lapro3067',
 u'Name': u'test.test',
 u'Region': u'0',
 u'RunAsDom': u'',
 u'RunAsHash': u'',
 u'RunAsName': u'',
 u'SendEmail': False,
 u'SendPopup': False,
 u'Service': u'',
 u'_id': u'test.test'}
Users.SaveUser(dictUser)

result: {u’ID’: u’test.test’, u’Name’: u’test.test’}
(instead of success)
If you now open the User management dialog and go to test.test, the user is added, but his email is missing for example.

Now call:

[code]
Users.SaveUser(dictUser)

[code]
again. Now the result is: ‘Success’
Opening the user management dialog will now the email set too.

Strange, definitely shouldn’t be behaving that way. We’ll get it fixed :slight_smile:

Privacy | Site terms | Cookie preferences