'Get the latest file from the current version.'

def get_latest_file(self):

    cur = self.current_version
    if cur:
        res = cur.files.order_by('-created')
        if res:
            return res[0]
