Esempio n. 1
0
 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))
Esempio n. 2
0
def AllStatus(type=''):
    return ContentStatus.all(type)
Esempio n. 3
0
def AllStatus(type=''):
    return ContentStatus.all(type)
Esempio n. 4
0
 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))