'Returns current revision if there is one, else the last created
revision.'

def current_or_latest_revision(self):

    rev = self.current_revision
    if (not rev):
        revs = self.revisions.order_by('-created')
        if revs.exists():
            rev = revs[0]
    return rev
