Skip to content

Store own attributes dictionary in 'own_attributes' - #371

Merged
iLLiCiTiT merged 4 commits into
developfrom
enhancement/own-attrib-key
Oct 26, 2026
Merged

iLLiCiTiT merged 4 commits into
developfrom
enhancement/own-attrib-key

Conversation

@iLLiCiTiT

@iLLiCiTiT iLLiCiTiT commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Changelog Description

Entities queried with own_attributes=True have new own_attributes key with dictionary of attribute values, where values that are not explicitly set on the entity are None. ownAttrib still contains the same dictionary for backwards compatibility, but should be used as list of attribute names in future.

Additional info

Follow up of #370.

ownAttrib returned from server is a list of attribute names that are explicitly set on the entity. With own_attributes=True it was replaced with a dictionary, so the key had different type based on the arguments.

Changes:

  • fill_own_attribs stores the dictionary in own_attributes. ownAttrib is replaced with a copy of it, with a TODO to keep it as a list once nothing uses it as dictionary.
  • get_users, get_user_by_name and get_user have new own_attributes argument and fill own_attributes only when it is True. ownAttrib is always a dictionary for users for backwards compatibility.
  • EntityHub uses own_attributes.
  • Docstrings of own_attributes mention own_attributes.

Known usages of ownAttrib as dictionary that should be changed to own_attributes:

  • ayon-ftrack client/ayon_ftrack/plugins/publish/collect_ftrack_api.py (folders with own_attributes=True).
  • ayon-core tools/browser/ui/browser_controller.py and ui/components/views/view_selector.py (users fullName).

Testing notes:

  1. Query projects, folders, tasks and users with own_attributes=True.
  2. own_attributes and ownAttrib contain the same dictionary.
  3. Without own_attributes, ownAttrib is a list of attribute names (or missing if not queried) and own_attributes is not set. Users always have ownAttrib as dictionary.
  4. EntityHub loads a project without changes.

iLLiCiTiT and others added 2 commits October 26, 2026 17:02
- 'fill_own_attribs' stores the dictionary in 'own_attrib'. 'ownAttrib'
  is still replaced with a copy for backwards compatibility.
- Users have 'own_attrib' too.
- EntityHub uses 'own_attrib'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iLLiCiTiT iLLiCiTiT changed the title Store own attributes dictionary in 'own_attrib' Store own attributes dictionary in 'own_attributes' Oct 26, 2026
@iLLiCiTiT iLLiCiTiT added the type: enhancement New feature or request label Oct 26, 2026
@iLLiCiTiT iLLiCiTiT self-assigned this Oct 26, 2026
iLLiCiTiT and others added 2 commits October 26, 2026 17:09
'get_users', 'get_user_by_name' and 'get_user' fill 'own_attributes'
only when 'own_attributes' is 'True'. 'ownAttrib' is always a dictionary
for backwards compatibility.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iLLiCiTiT
iLLiCiTiT merged commit 572a33f into develop Oct 26, 2026
3 checks passed
@iLLiCiTiT
iLLiCiTiT deleted the enhancement/own-attrib-key branch October 26, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant