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)