def reorder(cls):
        """
        Regenerate order attributes
        """
        items = cls._query_active_items().order_by(cls.order).all()

        for index, item in enumerate(items):
            item.order = index
            DBSESSION().merge(item)