misc/migration/postcreate.py
changeset 4835 13b0b96d7982
parent 4612 d6ae30c5d055
child 5174 78438ad513ca
child 5421 8167de96c523
equal deleted inserted replaced
4834:b718626a0e60 4835:13b0b96d7982
    40         from cubicweb.server import create_user
    40         from cubicweb.server import create_user
    41         create_user(session, unicode(anonlogin), anonpwd, 'guests')
    41         create_user(session, unicode(anonlogin), anonpwd, 'guests')
    42 
    42 
    43 # need this since we already have at least one user in the database (the default admin)
    43 # need this since we already have at least one user in the database (the default admin)
    44 for user in rql('Any X WHERE X is CWUser').entities():
    44 for user in rql('Any X WHERE X is CWUser').entities():
    45     session.unsafe_execute('SET X in_state S WHERE X eid %(x)s, S eid %(s)s',
    45     rql('SET X in_state S WHERE X eid %(x)s, S eid %(s)s',
    46                            {'x': user.eid, 's': activated.eid}, 'x')
    46         {'x': user.eid, 's': activated.eid}, 'x')
    47 
    47 
    48 # on interactive mode, ask for level 0 persistent options
    48 # on interactive mode, ask for level 0 persistent options
    49 if interactive_mode:
    49 if interactive_mode:
    50     cfg = config.persistent_options_configuration()
    50     cfg = config.persistent_options_configuration()
    51     cfg.input_config(inputlevel=0)
    51     cfg.input_config(inputlevel=0)