Skip to content

Commit

Permalink
Renamed flag for detecting managers built from QuerySets with as_mana…
Browse files Browse the repository at this point in the history
…ger().
  • Loading branch information
MarkusH authored and timgraham committed Jan 5, 2015
1 parent 572ad9a commit 05f702b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django/db/models/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def deconstruct(self):
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
Expand Down
2 changes: 1 addition & 1 deletion django/db/models/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def as_manager(cls):
# 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)
Expand Down

0 comments on commit 05f702b

Please sign in to comment.