invenio_migrator/legacy/access.py
def get(query, *args, **kwargs):
    """Get action definitions to dump."""
    run_sql = _get_run_sql()

    actions = [
        dict(id=row[0],
             name=row[1],
             allowedkeywords=row[2],
             optional=row[3])
        for action in query.split(',') for row in run_sql(
            'select id, name, description, allowedkeywords, optional '
            'from accACTION where name like %s', (action, ),
            run_on_slave=True)
    ]

    return len(actions), actions
def get(query, *args, **kwargs):
    """Get action definitions to dump."""
    run_sql = _get_run_sql()

    actions = [
        dict(id=row[0],
             name=row[1],
             allowedkeywords=row[2],
             optional=row[3])
        for action in query.split(',') for row in run_sql(
            'select id, name, description, allowedkeywords, optional '
            'from accACTION where name like %s', (action, ),
            run_on_slave=True)
    ]

    return len(actions), actions
Get action definitions to dump.