Custom Attribute for User (Project Based)
2 2

2 posts in this topic


I am trying to create an numerical custom attribute for Users but only for a specific project id. I am creating the attribute this way:

               {"project_id": current_project_id,
                "entity_type": "user",
                "type": custom_attr_type,
                "label": "TEST",
                "key": "test",
                "default": -1,
                "write_security_roles": [security_role],  # all roles
                "read_security_roles": [security_role],   # all roles  
                "config": json.dumps({'isdecimal': False})})

But I am not able to query it although I have correct permissions and I can see it in the ftrack Web Gui.

users = session.get_users()

for attr in users[0].["custom_attributes"]:
    print "Custom Attr: '{}'".format(attr)

If I set project_id = None I can read and write to it. but that is not an option.
Am I missing some detail on how to make it work project based?

Kind regards,


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
2 2