def set_status(self, content: Content, new_status: str): if new_status in ContentStatus.allowed_values(): content.status = new_status content.revision_type = ActionDescription.STATUS_UPDATE else: raise ValueError( 'The given value {} is not allowed'.format(new_status))
def AllStatus(type=''): return ContentStatus.all(type)
def set_status(self, content: Content, new_status: str): if new_status in ContentStatus.allowed_values(): content.status = new_status content.revision_type = ActionDescription.STATUS_UPDATE else: raise ValueError('The given value {} is not allowed'.format(new_status))