def getVersions(self, state, id): q = Query() return q.searchResults( Eq(('entry_catalog', 'workflow_state'), state) & Eq(('entry_catalog', 'workflow_id'), id))
def hasVersionId(self, id): q = Query() result = q.searchResults( Eq(('entry_catalog', 'workflow_id'), id)) return bool(len(result))