'Set archival bit of documents, percolating up to parents as well.'

@staticmethod
def _set_archival(queryset, should_be_archived):

    for doc in queryset:
        doc_to_change = (doc.parent or doc)
        doc_to_change.is_archived = should_be_archived
        doc_to_change.save()
