mirror of
https://github.com/simonw/datasette.git
synced 2026-05-27 12:34:37 +02:00
Move column_type defaults into dict literal
Set column_type and column_type_config to None in the initial col_dict instead of using an else branch. https://claude.ai/code/session_01SvPEPqHgURTWESRp28pTC3
This commit is contained in:
parent
9fe10cd1aa
commit
72c8c71518
1 changed files with 2 additions and 3 deletions
|
|
@ -208,14 +208,13 @@ async def display_columns_and_rows(
|
|||
"type": type_,
|
||||
"notnull": notnull,
|
||||
"description": column_descriptions.get(r[0]),
|
||||
"column_type": None,
|
||||
"column_type_config": None,
|
||||
}
|
||||
ct_info = column_types_map.get(r[0])
|
||||
if ct_info:
|
||||
col_dict["column_type"] = ct_info[0]
|
||||
col_dict["column_type_config"] = ct_info[1]
|
||||
else:
|
||||
col_dict["column_type"] = None
|
||||
col_dict["column_type_config"] = None
|
||||
columns.append(col_dict)
|
||||
|
||||
column_to_foreign_key_table = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue