From 157e4d36b0096c8ab71f88a6a47e2e5d8e0e9db7 Mon Sep 17 00:00:00 2001 From: "davide.fiocco" Date: Fri, 27 Feb 2026 23:48:17 +0100 Subject: [PATCH] Fix behavior in theory questions --- lua/code-practice/importer.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/code-practice/importer.lua b/lua/code-practice/importer.lua index 21e5a7f..2302fb1 100644 --- a/lua/code-practice/importer.lua +++ b/lua/code-practice/importer.lua @@ -89,7 +89,7 @@ function M.import(json_path, opts) sql_val(ex.id), sql_val(tc.input or ""), sql_val(tc.expected_output), - sql_val(tc.is_hidden and true or false), + sql_val(tc.is_hidden == true or tc.is_hidden == 1), sql_val(tc.description or "") ) local tc_ok = pcall(conn.eval, conn, tc_sql) @@ -105,7 +105,7 @@ function M.import(json_path, opts) sql_val(ex.id), sql_val(opt.option_number), sql_val(opt.option_text), - sql_val(opt.is_correct and true or false) + sql_val(opt.is_correct == 1) ) local opt_ok = pcall(conn.eval, conn, opt_sql) if opt_ok then