Commit 05f702b9 authored by Markus Holtermann's avatar Markus Holtermann Committed by Tim Graham
Browse files

Renamed flag for detecting managers built from QuerySets with as_manager().

parent 572ad9a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ class BaseManager(object):
        Raises a ValueError if the manager is dynamically generated.
        """
        qs_class = self._queryset_class
        if getattr(self, '_built_as_manager', False):
        if getattr(self, '_built_with_as_manager', False):
            # using MyQuerySet.as_manager()
            return (
                True,  # as_manager
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ class QuerySet(object):
        # Address the circular dependency between `Queryset` and `Manager`.
        from django.db.models.manager import Manager
        manager = Manager.from_queryset(cls)()
        manager._built_as_manager = True
        manager._built_with_as_manager = True
        return manager
    as_manager.queryset_only = True
    as_manager = classmethod(as_manager)