Repository navigation
Store own attributes dictionary in 'own_attributes' - #371
Merged
Merged
Conversation
- '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>
'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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Description
Entities queried with
own_attributes=Truehave newown_attributeskey with dictionary of attribute values, where values that are not explicitly set on the entity areNone.ownAttribstill contains the same dictionary for backwards compatibility, but should be used as list of attribute names in future.Additional info
Follow up of #370.
ownAttribreturned from server is a list of attribute names that are explicitly set on the entity. Withown_attributes=Trueit was replaced with a dictionary, so the key had different type based on the arguments.Changes:
fill_own_attribsstores the dictionary inown_attributes.ownAttribis 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_nameandget_userhave newown_attributesargument and fillown_attributesonly when it isTrue.ownAttribis always a dictionary for users for backwards compatibility.EntityHubusesown_attributes.own_attributesmentionown_attributes.Known usages of
ownAttribas dictionary that should be changed toown_attributes:client/ayon_ftrack/plugins/publish/collect_ftrack_api.py(folders withown_attributes=True).tools/browser/ui/browser_controller.pyandui/components/views/view_selector.py(usersfullName).Testing notes:
own_attributes=True.own_attributesandownAttribcontain the same dictionary.own_attributes,ownAttribis a list of attribute names (or missing if not queried) andown_attributesis not set. Users always haveownAttribas dictionary.EntityHubloads a project without changes.