From 838b4a7947bbff4133588e82b3419294acb59c1e Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 6 May 2021 21:39:08 +0200 Subject: [PATCH] core (memory/sqlite): return 0 instead of None when user has no file yet --- sat/memory/sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sat/memory/sqlite.py b/sat/memory/sqlite.py index a9c61fbd..ff956237 100644 --- a/sat/memory/sqlite.py +++ b/sat/memory/sqlite.py @@ -993,7 +993,7 @@ class SqliteStorage(object): query, (owner.userhost(), self.profiles[client.profile]) ) - return ret[0][0] + return ret[0][0] or 0 def _fileUpdate(self, cursor, file_id, column, update_cb): query = 'SELECT {column} FROM files where id=?'.format(column=column)