'Used to retrieve the filename of a revision.
But attachment.original_filename should always be used in the frontend
such that filenames stay consistent.'

def get_filename(self):

    if (not self.file):
        return None
    filename = self.file.name.split(u'/')[(-1)]
    return u'.'.join(filename.split(u'.')[:(-1)])
