Esempio n. 1
0
 def has_version(self, state):
     """Test for existing versions in given state"""
     wf_versions = IWorkflowVersions(self.parent)
     return wf_versions.has_version(state)
Esempio n. 2
0
def can_create_new_version(wf, context):  # pylint: disable=invalid-name,unused-argument
    """Check if we can create a new version"""
    # can't create new version when previous draft already exists
    versions = IWorkflowVersions(context)
    return not versions.has_version(DRAFT_STATE)