dipesh merchant Posted September 21, 2021 Report Share Posted September 21, 2021 entities = event['data'].get('entities', []) logging.info(entities) if ( len(entities) == 1 and entities[0]['action'] == 'remove' and entities[0]['entityType'] == 'timelog' ): event = ftrack_api.event.base.Event( topic='ftrack.action.trigger-user-interface', data={ 'type': 'message', 'success' :False, 'message' : 'you are not allowed to delete the timelog' }, target=( 'applicationId=ftrack.client.web and ' 'user.id={0}'.format( event['source']['user']['id'] ) ) ) session.event_hub.publish(event) session.event_hub.subscribe('topic=ftrack.update', print_event) session.event_hub.wait() Link to comment Share on other sites More sharing options...
dipesh merchant Posted September 21, 2021 Author Report Share Posted September 21, 2021 from the code its just give the message "you are not allowed to delete the timelog" but still delete the timelog. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now