def reorder_branches(content, contenttree):
    """
    After content modification/insert/delete the branch must be reordered.
    And this only if order of child-content is fixed (and not random)
    """

    if content.is_in_random_order:
        # Reorder is not necessary for random branches
        return (None)

    if content.db_parent:
        content.db_parent.db_ordered_children.reorder()
    else:
        contenttree.db_ordered_children.reorder()