shouldn't be so big. The only thing that changes is the model_comment part, right? We can refactor this out either by dynamically generating that SQL clause, or using SQL logic. (ie "AND ({model_comment} = 'all' or {model_comment} = tbl.model_comment)"
This if block: https://github.com/dssg/tyra/blob/master/webapp/query.py#L72
shouldn't be so big. The only thing that changes is the model_comment part, right? We can refactor this out either by dynamically generating that SQL clause, or using SQL logic. (ie "AND ({model_comment} = 'all' or {model_comment} = tbl.model_comment)"