From d94d4465d7e72e668122f81206397f4f20cf555b Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 25 Oct 2017 07:47:20 -0700 Subject: [PATCH] Double quote around column names This means filters still work even with column names that contain spaces --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index 3018ab74..3cf5548d 100644 --- a/app.py +++ b/app.py @@ -225,7 +225,7 @@ class RowView(BaseView): pk_values = compound_pks_from_path(pk_path) pks = pks_for_table(conn, table) wheres = [ - '{}=?'.format(pk) + '"{}"=?'.format(pk) for pk in pks ] sql = 'select * from "{}" where {}'.format(