src/reversion/revisions.py
def _follow_relationships(self, objects):
        """Follows all relationships in the given set of objects."""
        followed = set()
        def _follow(obj, version_type, exclude_concrete):
            # Check the pk first because objects without a pk are not hashable
            if obj.pk is None or obj in followed or (obj.__class__, obj.pk) == exclude_concrete:
                return

            model_parent_list = obj._meta.get_parent_list()
            followed.add((obj, version_type))
            adapter = self.get_adapter(obj.__class__)
            for related in adapter.get_followed_relations(obj):
                _follow(related, version_type if related.__class__ in model_parent_list else Version.TYPE.FOLLOW,
                        exclude_concrete)
        for obj, version_type in objects:
            exclude_concrete = None
            if obj._meta.proxy:
                exclude_concrete = (obj._meta.concrete_model, obj.pk)
            _follow(obj, version_type, exclude_concrete)
        return followed
Follows all relationships in the given set of objects.
Follows all relationships in the given set of objects.
Follows all relationships in the given set of objects .
def _follow_relationships(self, objects):
        followed = set()
        def _follow(obj, version_type, exclude_concrete):
            if obj.pk is None or obj in followed or (obj.__class__, obj.pk) == exclude_concrete:
                return
            model_parent_list = obj._meta.get_parent_list()
            followed.add((obj, version_type))
            adapter = self.get_adapter(obj.__class__)
            for related in adapter.get_followed_relations(obj):
                _follow(related, version_type if related.__class__ in model_parent_list else Version.TYPE.FOLLOW,
                        exclude_concrete)
        for obj, version_type in objects:
            exclude_concrete = None
            if obj._meta.proxy:
                exclude_concrete = (obj._meta.concrete_model, obj.pk)
            _follow(obj, version_type, exclude_concrete)
        return followed
def _follow_relationships ( self , objects ) : followed = set ( ) def _follow ( obj , version_type , exclude_concrete ) : if obj . pk is None or obj in followed or ( obj . __class__ , obj . pk ) == exclude_concrete : return model_parent_list = obj . _meta . get_parent_list ( ) followed . add ( ( obj , version_type ) ) adapter = self . get_adapter ( obj . __class__ ) for related in adapter . get_followed_relations ( obj ) : _follow ( related , version_type if related . __class__ in model_parent_list else Version . TYPE . FOLLOW , exclude_concrete ) for obj , version_type in objects : exclude_concrete = None if obj . _meta . proxy : exclude_concrete = ( obj . _meta . concrete_model , obj . pk ) _follow ( obj , version_type , exclude_concrete ) return followed
Follows all relationships in the given set of objects.
Follows all relationships in the given set of objects .
"""Follows all relationships in the given set of objects.""" # Check the pk first because objects without a pk are not hashable
self
objects