i would rewrite this to explicitly access the view by the database (`CommCareCaseGroup.get_db().view()`). and potentially make it a utility on the `CommCareCaseGroup` class.