Child: [bea16d] (diff)

Download this file

025-add-is-nbhd-project.py    18 lines (11 with data), 434 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import logging
import re
from pylons import c
from ming.orm import ThreadLocalORMSession, session
from allura import model as M
log = logging.getLogger(__name__)
def main():
M.Project.query.update({'shortname': '--init--'}, {'$set': {'is_nbhd_project': True}}, multi=True)
M.Project.query.update({'shortname': {'$ne': '--init--'}}, {'$set': {'is_nbhd_project': False}}, multi=True)
if __name__ == '__main__':
main()