From f6c50cc6abe3c3f5860e0a74fdcb53a5b0393b3b Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Mon, 12 Jan 2026 10:58:46 -0500 Subject: [PATCH] Update ntclient/persistence/sql/nt/funcs.py Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --- ntclient/persistence/sql/nt/funcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntclient/persistence/sql/nt/funcs.py b/ntclient/persistence/sql/nt/funcs.py index d2cd462..0b3773a 100644 --- a/ntclient/persistence/sql/nt/funcs.py +++ b/ntclient/persistence/sql/nt/funcs.py @@ -9,4 +9,4 @@ def sql_nt_next_index(table: str) -> int: # noinspection SqlResolve query = "SELECT MAX(id) as max_id FROM %s;" % table # nosec: B608 rows, _, _, _ = sql(query) - return int(rows[0]["max_id"]) + return int(rows[0]["max_id"] or 0) -- 2.52.0