mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fixed bug where tables with a column called n caused 500 errors
Closes #1228
This commit is contained in:
parent
32963018e7
commit
4e47a2d894
7 changed files with 59 additions and 37 deletions
|
|
@ -24,22 +24,22 @@ world
|
|||
)
|
||||
|
||||
EXPECTED_TABLE_WITH_LABELS_CSV = """
|
||||
pk,created,planet_int,on_earth,state,_city_id,_city_id_label,_neighborhood,tags,complex_array,distinct_some_null
|
||||
1,2019-01-14 08:00:00,1,1,CA,1,San Francisco,Mission,"[""tag1"", ""tag2""]","[{""foo"": ""bar""}]",one
|
||||
2,2019-01-14 08:00:00,1,1,CA,1,San Francisco,Dogpatch,"[""tag1"", ""tag3""]",[],two
|
||||
3,2019-01-14 08:00:00,1,1,CA,1,San Francisco,SOMA,[],[],
|
||||
4,2019-01-14 08:00:00,1,1,CA,1,San Francisco,Tenderloin,[],[],
|
||||
5,2019-01-15 08:00:00,1,1,CA,1,San Francisco,Bernal Heights,[],[],
|
||||
6,2019-01-15 08:00:00,1,1,CA,1,San Francisco,Hayes Valley,[],[],
|
||||
7,2019-01-15 08:00:00,1,1,CA,2,Los Angeles,Hollywood,[],[],
|
||||
8,2019-01-15 08:00:00,1,1,CA,2,Los Angeles,Downtown,[],[],
|
||||
9,2019-01-16 08:00:00,1,1,CA,2,Los Angeles,Los Feliz,[],[],
|
||||
10,2019-01-16 08:00:00,1,1,CA,2,Los Angeles,Koreatown,[],[],
|
||||
11,2019-01-16 08:00:00,1,1,MI,3,Detroit,Downtown,[],[],
|
||||
12,2019-01-17 08:00:00,1,1,MI,3,Detroit,Greektown,[],[],
|
||||
13,2019-01-17 08:00:00,1,1,MI,3,Detroit,Corktown,[],[],
|
||||
14,2019-01-17 08:00:00,1,1,MI,3,Detroit,Mexicantown,[],[],
|
||||
15,2019-01-17 08:00:00,2,0,MC,4,Memnonia,Arcadia Planitia,[],[],
|
||||
pk,created,planet_int,on_earth,state,_city_id,_city_id_label,_neighborhood,tags,complex_array,distinct_some_null,n
|
||||
1,2019-01-14 08:00:00,1,1,CA,1,San Francisco,Mission,"[""tag1"", ""tag2""]","[{""foo"": ""bar""}]",one,n1
|
||||
2,2019-01-14 08:00:00,1,1,CA,1,San Francisco,Dogpatch,"[""tag1"", ""tag3""]",[],two,n2
|
||||
3,2019-01-14 08:00:00,1,1,CA,1,San Francisco,SOMA,[],[],,
|
||||
4,2019-01-14 08:00:00,1,1,CA,1,San Francisco,Tenderloin,[],[],,
|
||||
5,2019-01-15 08:00:00,1,1,CA,1,San Francisco,Bernal Heights,[],[],,
|
||||
6,2019-01-15 08:00:00,1,1,CA,1,San Francisco,Hayes Valley,[],[],,
|
||||
7,2019-01-15 08:00:00,1,1,CA,2,Los Angeles,Hollywood,[],[],,
|
||||
8,2019-01-15 08:00:00,1,1,CA,2,Los Angeles,Downtown,[],[],,
|
||||
9,2019-01-16 08:00:00,1,1,CA,2,Los Angeles,Los Feliz,[],[],,
|
||||
10,2019-01-16 08:00:00,1,1,CA,2,Los Angeles,Koreatown,[],[],,
|
||||
11,2019-01-16 08:00:00,1,1,MI,3,Detroit,Downtown,[],[],,
|
||||
12,2019-01-17 08:00:00,1,1,MI,3,Detroit,Greektown,[],[],,
|
||||
13,2019-01-17 08:00:00,1,1,MI,3,Detroit,Corktown,[],[],,
|
||||
14,2019-01-17 08:00:00,1,1,MI,3,Detroit,Mexicantown,[],[],,
|
||||
15,2019-01-17 08:00:00,2,0,MC,4,Memnonia,Arcadia Planitia,[],[],,
|
||||
""".lstrip().replace(
|
||||
"\n", "\r\n"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue