Jump to content

Unpersisted operation


Recommended Posts

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.

Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...


This topic is now archived and is closed to further replies.

  • Create New...