PrimaryObject.get_field(): ignore error on invalid list length
This commit is contained in:
parent
84ed939e82
commit
64a3b6570d
@ -262,8 +262,14 @@ class BasicPrimaryObject(TableObject, PrivacyBase, TagBase):
|
|||||||
elif isinstance(current, (list, tuple)):
|
elif isinstance(current, (list, tuple)):
|
||||||
if part.isdigit():
|
if part.isdigit():
|
||||||
# followed by index, so continue here
|
# followed by index, so continue here
|
||||||
|
if int(part) < len(current):
|
||||||
current = current[int(part)]
|
current = current[int(part)]
|
||||||
path_to.append(part)
|
path_to.append(part)
|
||||||
|
elif ignore_errors:
|
||||||
|
current = None
|
||||||
|
keeping_going = False
|
||||||
|
else:
|
||||||
|
raise
|
||||||
else: # else branch! in middle, split paths
|
else: # else branch! in middle, split paths
|
||||||
for i in range(len(current)):
|
for i in range(len(current)):
|
||||||
#print("split :", self.__class__.__name__,
|
#print("split :", self.__class__.__name__,
|
||||||
|
Loading…
Reference in New Issue
Block a user