bgd-cleanup: Exit early if no digests are marked for cleanup
There was a small edge case where the index return None
when there were no digests for deletion, and we tried to print len(None)
in the logs, causing a TypeError
.
This MR updates the cleanup logic to only happen when digests
contains items.