Switch to unified view

a/scripts/publicize-neighborhood.py b/scripts/publicize-neighborhood.py
...
...
20
    admin_role = M.ProjectRole.by_name('Admin', project=nbhd.neighborhood_project)
20
    admin_role = M.ProjectRole.by_name('Admin', project=nbhd.neighborhood_project)
21
    nbhd_admin = admin_role.users_with_role(project=nbhd.neighborhood_project)[0].user
21
    nbhd_admin = admin_role.users_with_role(project=nbhd.neighborhood_project)[0].user
22
    log.info('Making updates as neighborhood admin "%s"' % nbhd_admin.username)
22
    log.info('Making updates as neighborhood admin "%s"' % nbhd_admin.username)
23
23
24
    q = {'neighborhood_id': nbhd._id,
24
    q = {'neighborhood_id': nbhd._id,
25
            'shortname': {'$ne':'--init--'}, 'deleted':False}
25
            'is_nbhd_project': False, 'deleted':False}
26
    private_count = public_count = 0
26
    private_count = public_count = 0
27
    for projects in utils.chunked_find(M.Project, q):
27
    for projects in utils.chunked_find(M.Project, q):
28
        for p in projects:
28
        for p in projects:
29
            role_anon = M.ProjectRole.upsert(name='*anonymous',
29
            role_anon = M.ProjectRole.upsert(name='*anonymous',
30
                    project_id=p.root_project._id)
30
                    project_id=p.root_project._id)