Fixup view.py for new database