core (memory/sqlite): return 0 instead of None when user has no file yet

This commit is contained in:
Goffi 2021-05-06 21:39:08 +02:00
commit 838b4a7947

View file

@ -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)