Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

feature/ftrack attrs cleanup #127

Merged
merged 1 commit into from
May 6, 2020
Merged

Conversation

iLLiCiTiT
Copy link
Member

Issue:
Hierarchical custom attributes can't be "unset" via Ftrack website GUI.

Solution:
Added action triggerable on project which clean all hierarchical values set to None.

@iLLiCiTiT iLLiCiTiT self-assigned this May 6, 2020
return True


def register(session, plugins_presets={}):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.

self.log.debug("Cleaning up {} values for \"{}\".".format(
len(data), configuration_key
))
for entity_id, value in data.items():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loop control variable 'value' not used within the loop body. If this is intended, start the name with an underscore.

@iLLiCiTiT iLLiCiTiT requested review from antirotor and mkolar May 6, 2020 12:31
@mkolar mkolar merged commit 35acf09 into develop May 6, 2020
@mkolar mkolar deleted the feature/ftrack_attrs_cleanup branch May 13, 2020 21:02
@mkolar mkolar added this to the 2.9 milestone May 25, 2020
Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request Jun 15, 2023
Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request Aug 4, 2023
Tilix4 added a commit to Tilix4/OpenPype that referenced this pull request Oct 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants