'The record ID of a task as separate column in the data table'

@staticmethod
def project_task_task_id(row):

    if hasattr(row, 'project_task'):
        row = row.project_task
    try:
        return row.id
    except AttributeError:
        return None
