Removed unused condition for the abstract model in ensure_default_manager()

This commit is contained in:
Andriy Sokolovskiy 2015-06-18 16:44:39 +03:00 committed by Tim Graham
parent c0cf73a57d
commit 7866968eb3
1 changed files with 1 additions and 4 deletions

View File

@ -15,10 +15,7 @@ def ensure_default_manager(cls):
points to a plain Manager instance (which could be the same as
_default_manager if it's not a subclass of Manager).
"""
if cls._meta.abstract:
setattr(cls, 'objects', AbstractManagerDescriptor(cls))
return
elif cls._meta.swapped:
if cls._meta.swapped:
setattr(cls, 'objects', SwappedManagerDescriptor(cls))
return
if not getattr(cls, '_default_manager', None):