Unpersisted operation
1 1

4 posts in this topic

Recently, I have noticed a leftover recorded operation after publishing new asset versions. When I print the contents of the operation, it looks something like this:

{'old_value': Symbol(NOT_SET), 'new_value': Symbol(NOT_SET), 'entity_key': OrderedDict([('id', <id hash>)]), 'attribute_name': u'components', 'entity_type': u'AssetVersion'}

If my script publishes multiple versions in a row, the id hash always matches the last version published to the database. What is going on here? It seems odd that the old and new values are NOT_SET.

We are currently using Ftrack Python API version 1.0.4.

Share this post


Link to post
Share on other sites

I will try... It might be a little difficult to create a minimal example here, because this has arisen in a rather complex scenario. (Note: I have a support ticket open for this as well.) The basic setup is this:

I have a PyQt app with a UI. All of the Ftrack operations are carried out by a worker class called FtrackWorker, which lives on a secondary thread spawned and maintained by a QThread. FtrackWorker and the main window communicate via signals. The FtrackWorker class queries Ftrack for data to display in the UI. Once the user selects some asset versions from the UI, the worker calls a CopyAsset class to copy the contents of that asset to another project in Ftrack and on disk. It is after the completion of that copy that the unpersisted operation appears.

Share this post


Link to post
Share on other sites

This has been resolve in the support channel.

Cause and solution can be different depending on multiple factors.

In case of similar behaviour, please contact ftrack support.

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
1 1