-
Posts
2 -
Joined
-
Last visited
Content Type
Events
Profiles
Forums
Downloads
Posts posted by dipesh merchant
-
-
entities = event['data'].get('entities', [])logging.info(entities)if (len(entities) == 1 andentities[0]['action'] == 'remove' andentities[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()
How can i restrict time logger deletion i tried below code and found the exact events but dont know what next to do?.. please find the below code
in API
Posted
from the code its just give the message "you are not allowed to delete the timelog" but still delete the timelog.