changeset 3535:67aebefb44fc

core (memory/sqlite): return 0 instead of None when user has no file yet
author Goffi <goffi@goffi.org>
date Thu, 06 May 2021 21:39:08 +0200
parents 1658472abd77
children 0985c47ffd96
files sat/memory/sqlite.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/sqlite.py	Thu May 06 18:11:33 2021 +0200
+++ b/sat/memory/sqlite.py	Thu May 06 21:39:08 2021 +0200
@@ -993,7 +993,7 @@
             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)