Remus Avram Posted January 12, 2017 Report Share Posted January 12, 2017 If we create a task, assignee a user to the task and get the assigned user in the same session, it doesn't return the assigned user. ftrack_task = session.query("Task where id is '{0}'".format(task_id)) assert len(ftrack_entity['assignments']) == 0 session.create('Appointment', { 'resource': ftrack_user, 'context_id': ftrack_task, "type": "assignment"} ) session.commit() assert len(ftrack_task['assignments']) > 0 ftrack_task = session.query("Task where id is '{0}'".format(task_id)) assert len(ftrack_task['assignments']) > 0 Link to comment Share on other sites More sharing options...
Björn Rydahl Posted January 12, 2017 Report Share Posted January 12, 2017 Hi Remus, that is the cache kicking in. We will try to solve this longer term, for now it is important that you query any attribute that you want to be fetched from the server like: ftrack_task = session.query("select assignments from Task where id is '{0}'".format(task_id)) Its either that of clearing the cache. Link to comment Share on other sites More sharing options...
Remus Avram Posted January 12, 2017 Author Report Share Posted January 12, 2017 Thanks Bjoern for your quick answer! Then we will query like that. Link to comment Share on other sites More sharing options...
Remus Avram Posted March 22, 2017 Author Report Share Posted March 22, 2017 Hi @Björn Rydahl are there any updates regarding this problem? We have it in multiple locations and it's difficult to find all the time workarounds, and somethings is really confusing (most cases when we are running actions on the ftrack server which use one session of ftrack_api). Tested on: ftrack serve: 3.3.40 ftrack_api: 1.1.0 Link to comment Share on other sites More sharing options...
Remus Avram Posted August 10, 2017 Author Report Share Posted August 10, 2017 This issue is fixed. Tested with: ftrack server: 3.5.6 ftrack_api: 1.3.1 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.