I noticed that get_users() and get_user() behave differently for isManager :
get_users() always returns the isManager key.
get_user() returns the isManager key, only if isAdmin is False.
import ayon_api
curUser = ayon_api.get_user()
print(curUser["data"]["isManager"]) # Fails if the current user is an admin.
users = ayon_api.get_users()
for curUser in users:
print(curUser["name"], curUser["isManager"], curUser["isAdmin"], curUser["isService"])
Example of get_users result :
Name isManager isAdmin isService
admin True True False Note that an admin is both an admin and a manager.
manager True False False
service True False True Note that a service is both a service and a manager.
artist False False False
It’s easy to deal with it, I was just wondering if it was done on purpose.