Eric Hermelin
-
Posts
46 -
Joined
-
Last visited
-
Days Won
7
Content Type
Events
Profiles
Forums
Downloads
Posts posted by Eric Hermelin
-
-
Hi,
Currently this does not exists for other entities, we are however discussing different approaches for allowing this in the future. In the meantime you could perhaps ( provided the entity was created through the web interface ) create send back some feedback to the user with something like:
session.delete( task ) event = ftrack_api.event.base.Event( topic='ftrack.action.trigger-user-interface', data={ 'type': 'message', 'success': False, 'message': 'Your task was incorrectly named' }, target=( 'applicationId=ftrack.client.web and user.id={0}'.format( event['source']['user']['id'] ) ) ) session.event_hub.publish( event ) session.commit()
cheers
Eric
-
Hi Thorsten,
The new API was originally designed to be compatible with both python 2.x and 3.x but due to the extra testing required we currently only support the former. It is something we have wanted to look at but it has not been a high priority. CY2019 ( http://www.vfxplatform.com/ ) might however move to version 3.x due to support for python 2.x coming to an end in 2020 so it is something we definitely need to start looking at.
cheers
Eric
Get Only Latest Versions with API
in API
Posted
Hi,
you could order by the version attribute ie.
asset_version = session.query( 'select version from AssetVersion where task_id is "{0}" order by version desc'.format( 'ecac0828-4d0a-11e7-953e-0a580aa00899' ) ).first()
cheers
Eric