diff sat/memory/sqlite.py @ 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 30779935c0aa
children 31cbcdd096a2
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)