diff --git a/swh/scrubber/db.py b/swh/scrubber/db.py --- a/swh/scrubber/db.py +++ b/swh/scrubber/db.py @@ -74,7 +74,9 @@ """, (dataclasses.asdict(datastore)), ) - (id_,) = cur.fetchone() + res = cur.fetchone() + assert res is not None + (id_,) = res return id_ def corrupt_object_add(