app.py: fixing syntax error in units view