couldn't this loop/query be replaced with a query onto the revision object directly and then delete the whole queryset? Doesn't this make 1+2n queries?