mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Fixed #18963 -- Used a subclass-friendly pattern
for Python 2 object model compatibility methods.
This commit is contained in:
@@ -69,7 +69,9 @@ class BaseFormSet(object):
|
||||
def __bool__(self):
|
||||
"""All formsets have a management form which is not included in the length"""
|
||||
return True
|
||||
__nonzero__ = __bool__ # Python 2
|
||||
|
||||
def __nonzero__(self): # Python 2 compatibility
|
||||
return type(self).__bool__(self)
|
||||
|
||||
@property
|
||||
def management_form(self):
|
||||
|
||||
Reference in New Issue
Block a user