0

sg_last_version field

Hello, i'm trying to get last version and always get None. Here is my python code:

sg_task = sg.find_one('Task', filters = [['id', 'is', 6765]], fields = ['content', 'link', 'sg_last_version'])

print sg_task['sg_last_version'] >>> None

In shotgun web ui i can see that this Task sg_last_version field is visible and there is a link to file in it.

What i'm doing wrong? 

Python API - 3.0.9b2.

2件のコメント

  • 0
    Avatar
    Rob Blau

    Hi there Alexey,

    That field is a query field, whose value results from a query along the lines of:
    Show me the first Version linked to this task via task when reverse sorting by date created.

    The values from those fields can't be gotten from the API, you'll need to do a second query to pull back information abou that Version.

    -r

  • 0
    Avatar
    Alexey Sadrutdinov

    Hi Rob. I just tweeked my code  to find all versions for particular entity, in sorted order. Works like it should!

    Thx!

ログインしてコメントを残してください。