From e2c5231a844e93b3f7f730c8cbe92d2271df2068 Mon Sep 17 00:00:00 2001 From: "bnmcgn@gmail.com" Date: Mon, 26 Jun 2023 09:58:01 -0700 Subject: [PATCH] Bugfix - NULL in wrong place causes the insert or delete to not find the applicable row, blocking the change --- setup.py | 2 +- src/vibase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 7a47994..2f6ef2d 100755 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ sys.exit("Requires python 3 or greater") setup(name='vibase', - version='0.0.1', + version='0.0.2', description='Edit a database table using the VIM editor', author='Ben McGunigle', author_email='bnmcgn@gmail.com', diff --git a/src/vibase.py b/src/vibase.py index 1183023..33d758a 100644 --- a/src/vibase.py +++ b/src/vibase.py @@ -23,7 +23,7 @@ def write_csv(fname, conn, table): headers = [i[0] for i in cursor.description] writ.writerow(headers) for row in cursor: - writ.writerow([x if x else "NULL" for x in row]) + writ.writerow(["NULL" if x == None else x for x in row]) #writ.writerows(cursor) return headers