From: Shane Jaroch Date: Mon, 12 Jan 2026 15:58:46 +0000 (-0500) Subject: Update ntclient/persistence/sql/nt/funcs.py X-Git-Url: https://git.nutra.tk/v1?a=commitdiff_plain;h=refs%2Fpull%2F21%2Fhead;p=nutratech%2Fcli.git Update ntclient/persistence/sql/nt/funcs.py Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --- 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)