Object.get_field: two bugs, one in attr on list, and multiple results
This commit is contained in:
@@ -269,8 +269,8 @@ class BasicPrimaryObject(TableObject, PrivacyBase, TagBase):
|
|||||||
#print("split :", self.__class__.__name__,
|
#print("split :", self.__class__.__name__,
|
||||||
# current.__class__.__name__,
|
# current.__class__.__name__,
|
||||||
# [str(i)] + chain[p:],
|
# [str(i)] + chain[p:],
|
||||||
# path_to[:-len(chain[p:])])
|
# path_to[:])
|
||||||
todo.append([self, current, [str(i)] + chain[p:], path_to[:-len(chain[p:])]])
|
todo.append([self, current, [str(i)] + chain[p:], path_to[:]])
|
||||||
current = None
|
current = None
|
||||||
keep_going = False
|
keep_going = False
|
||||||
else: # part not found on this self
|
else: # part not found on this self
|
||||||
@@ -312,8 +312,8 @@ class BasicPrimaryObject(TableObject, PrivacyBase, TagBase):
|
|||||||
current = None
|
current = None
|
||||||
keep_going = False
|
keep_going = False
|
||||||
p += 1
|
p += 1
|
||||||
if keep_going:
|
if keep_going:
|
||||||
results.append(current)
|
results.append(current)
|
||||||
if len(results) == 1:
|
if len(results) == 1:
|
||||||
return results[0]
|
return results[0]
|
||||||
elif len(results) == 0:
|
elif len(results) == 0:
|
||||||
|
Reference in New Issue
Block a user