general: allow slicing querysets (#43328)
This commit is contained in:
parent
ba0f3a4bb0
commit
9ebb81bd09
|
@ -139,7 +139,8 @@ class LazyFormDefObjectsManager(object):
|
|||
|
||||
def __getitem__(self, key):
|
||||
try:
|
||||
int(key)
|
||||
if not isinstance(key, slice):
|
||||
int(key)
|
||||
except ValueError:
|
||||
# A django template doing formdef.objects.drafts would start by
|
||||
# doing ['drafts'], that would raise TypeError and then continue
|
||||
|
|
Loading…
Reference in New Issue