Switch to unified view

a/scripts/make-attachments-polymorphic.py b/scripts/make-attachments-polymorphic.py
...
...
32
                log.info('%s: %s', t.url(), a.filename)
32
                log.info('%s: %s', t.url(), a.filename)
33
        log.info('Fixing %d wikis', WM.Page.query.find().count())
33
        log.info('Fixing %d wikis', WM.Page.query.find().count())
34
        for p in WM.Page.query.find():
34
        for p in WM.Page.query.find():
35
            for a in WM.WikiAttachment.query.find(dict(
35
            for a in WM.WikiAttachment.query.find(dict(
36
                    artifact_id=p._id)):
36
                    artifact_id=p._id)):
37
                log.info('%s: %s' % p.url(), a.filename)
37
                log.info('%s: %s', p.url(), a.filename)
38
        ThreadLocalORMSession.flush_all()
38
        ThreadLocalORMSession.flush_all()
39
39
40
if __name__ == '__main__':
40
if __name__ == '__main__':
41
    main()
41
    main()