From 72c8c715186b95c5ccca5a51d1328fb006fc6698 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Mar 2026 04:54:36 +0000 Subject: [PATCH] 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 --- datasette/views/table.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/datasette/views/table.py b/datasette/views/table.py index 2b393087..30beb81f 100644 --- a/datasette/views/table.py +++ b/datasette/views/table.py @@ -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 = {