mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
Removed unused condition for the abstract model in ensure_default_manager()
This commit is contained in:
parent
c0cf73a57d
commit
7866968eb3
@ -15,10 +15,7 @@ def ensure_default_manager(cls):
|
|||||||
points to a plain Manager instance (which could be the same as
|
points to a plain Manager instance (which could be the same as
|
||||||
_default_manager if it's not a subclass of Manager).
|
_default_manager if it's not a subclass of Manager).
|
||||||
"""
|
"""
|
||||||
if cls._meta.abstract:
|
if cls._meta.swapped:
|
||||||
setattr(cls, 'objects', AbstractManagerDescriptor(cls))
|
|
||||||
return
|
|
||||||
elif cls._meta.swapped:
|
|
||||||
setattr(cls, 'objects', SwappedManagerDescriptor(cls))
|
setattr(cls, 'objects', SwappedManagerDescriptor(cls))
|
||||||
return
|
return
|
||||||
if not getattr(cls, '_default_manager', None):
|
if not getattr(cls, '_default_manager', None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user