Skip to content

fixing bug related to version links#63

Merged
maxpareschi merged 1 commit intomaxpareschi:3.14.11-22dogs.developfrom
jm22dogs:ftrack_project_filter
Feb 21, 2025
Merged

fixing bug related to version links#63
maxpareschi merged 1 commit intomaxpareschi:3.14.11-22dogs.developfrom
jm22dogs:ftrack_project_filter

Conversation

@jm22dogs
Copy link

Brief description

When creating a CustomAttributeLink, if there was already a link for that AssetVersion, an error was raised:

2025-02-21 15:00:38:  0: STDOUT: ERROR:ftrack_api.session.Session:Server reported error: DuplicateEntryError(Duplicate entry bbef5b66-23fd-46b8-80b7-768bd244e6bc-45abb5e1-f77d-49e8-8c34-... for CustomAttributeLink unique on from_id, to_id, configuration_id.)
2025-02-21 15:00:38:  0: STDOUT: NoneType: None
2025-02-21 15:00:38:  0: STDOUT: WARNING:ftrack_api.session.Session:Resetting session with pending operations not persisted.
2025-02-21 15:00:38:  0: STDOUT: ERROR:pyblish.plugin:Traceback (most recent call last):
2025-02-21 15:00:38:  0: STDOUT:   File "C:\Program Files (x86)\OpenPype\3.14.10\dependencies\pyblish\plugin.py", line 522, in __explicit_process
2025-02-21 15:00:38:  0: STDOUT:     runner(*args)
2025-02-21 15:00:38:  0: STDOUT:   File "C:\Users\22deadline.AD\AppData\Local\pypeclub\openpype\3.14\openpype-v3.14.11-22dogs.150+staging\openpype\modules\ftrack\plugins\publish\integrate_ftrack_api.py", line 103, in process
2025-02-21 15:00:38:  0: STDOUT:   File "C:\Users\22deadline.AD\AppData\Local\pypeclub\openpype\3.14\openpype-v3.14.11-22dogs.150+staging\openpype\modules\ftrack\plugins\publish\integrate_ftrack_api.py", line 246, in integrate_to_ftrack
2025-02-21 15:00:38:  0: STDOUT:   File "C:\Program Files (x86)\OpenPype\3.14.10\dependencies\ftrack_api\session.py", line 1308, in commit
2025-02-21 15:00:38:  0: STDOUT:     result = self.call(batch)
2025-02-21 15:00:38:  0: STDOUT:   File "C:\Program Files (x86)\OpenPype\3.14.10\dependencies\ftrack_api\session.py", line 1687, in call
2025-02-21 15:00:38:  0: STDOUT:     raise ftrack_api.exception.ServerError(error_message)

This PR adds a specific function for the creation of these types of links and handles the existing of a previous link, removing it before creating the new one.

@maxpareschi maxpareschi merged commit cccb4d2 into maxpareschi:3.14.11-22dogs.develop Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments