keyframe Posted October 20, 2017 Report Share Posted October 20, 2017 Heya everyone, I'm attempting to prevent users from renaming entities in an action subscribed to the ftrack.update event. In doing so, I set off another ftrack.update event, which calls the action, which sets off another ftrack.update event. Any clues would be most appreciated. G Link to comment Share on other sites More sharing options...
Mattias Lagergren Posted October 23, 2017 Report Share Posted October 23, 2017 There might be some interesting discussions for you here: Link to comment Share on other sites More sharing options...
Remus Avram Posted November 1, 2017 Report Share Posted November 1, 2017 Hi @keyframe we have this already implemented in our system. Let me know if you need any help with it. Link to comment Share on other sites More sharing options...
keyframe Posted November 1, 2017 Author Report Share Posted November 1, 2017 @Remus Avram: Thank you Remus, we ended up following your breadcrumb and creating a dedicated API user to filter through the events. Works like a charm, but quite disappointing that it requires a license. Thanks again for the offer to help. It's much appreciated. Cheers, G Link to comment Share on other sites More sharing options...
Björn Rydahl Posted November 2, 2017 Report Share Posted November 2, 2017 Hi Everyone, here is a workaround for this issue. I can't guarantee that it works in all situations or that we will not change something in the future causing it to fail. When creating the API session you will use to make the changes you can set the client token header which will be included in update events triggered from that update. session = ftrack_api.Session() session._request.headers.update( {'ftrack-clienttoken': 'API-EVENT-UPDATER-TOKEN'} ) Then in your listener you can get clientToken from the data in the event to check if you were the one triggering this event. Good luck! Link to comment Share on other sites More sharing options...
keyframe Posted November 5, 2017 Author Report Share Posted November 5, 2017 On 11/2/2017 at 5:26 PM, Björn Rydahl said: I can't guarantee that it works in all situations or that we will not change something in the future causing it to fail. Thanks Bjorn. Way to sell the appraoch! G Link to comment Share on other sites More sharing options...
Björn Rydahl Posted November 9, 2017 Report Share Posted November 9, 2017 I just dont want you to come after me if it does change. We are however discussing this internally and considering adding it to the API clients so that you dont have to add the headers yourself which would make it a permanent solution. Cheers Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.