I'm trying to get all project's tasks with users assignated to them in the less possible query.
session = ftrack_api.Session()
tasks = session.query('Task where project.full_name is "' + projectName + '" ').all()
session.populate(tasks, 'name,status.name,assignments.context.name' )
for task in tasks :
with session.auto_populating(False) :
if len(task['assignments'])> 0 :
print( task['assignments']['resource'] )
I get this :
But when I try to get ressource attribute value from this, it's empty.
str( task['assignments']['resource']) return "NOT SET",
That must be caused by auto_populating(False)
So perhaps I need to modify my query ?
Cause if I remove auto_populating(False), I'm afraid that is gonna be slow;