Revert "Rewrite the empty function according to the new NotLoaded"
This reverts commit 22606d961f.
This commit is contained in:
parent
892b3634a3
commit
03ce941ccf
1 changed files with 2 additions and 4 deletions
|
|
@ -41,10 +41,8 @@ def empty(value):
|
|||
|
||||
:rtype: :class:`bool`
|
||||
"""
|
||||
if value is None:
|
||||
return True
|
||||
for cls in (NotLoadedType, NotAvailableType):
|
||||
if type(value) is cls:
|
||||
for cls in (None, NotLoaded, NotAvailable):
|
||||
if value is cls:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue