]> Nutra Git (v1) - nutratech/cli.git/commitdiff
Update ntclient/persistence/sql/nt/funcs.py dev 21/head
authorShane Jaroch <chown_tee@proton.me>
Mon, 12 Jan 2026 15:58:46 +0000 (10:58 -0500)
committerGitHub <noreply@github.com>
Mon, 12 Jan 2026 15:58:46 +0000 (10:58 -0500)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
ntclient/persistence/sql/nt/funcs.py

index d2cd4626c952c6fc8e1a4df9b92579af36ee31bf..0b3773a04560030b037de5d469087c67bd463d09 100644 (file)
@@ -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)