diff --git a/swh/storage/db.py b/swh/storage/db.py --- a/swh/storage/db.py +++ b/swh/storage/db.py @@ -677,6 +677,8 @@ """ if content is not None: query += "WHERE content_id='%s'" % content + else: + query += 'ORDER BY content_id' cur = self._cursor(cur) cur.execute(query)