Fix bug in management command for updating ratings