You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When casting a record as dict, any lists within the record are not converted to dicts.
An example of this is tagged_vlans for interfaces.
The following update to the Record iter resolves the issue:
for i in dict(self._init_cache):
cur_attr = getattr(self, i)
if isinstance(cur_attr, Record):
yield i, dict(cur_attr)
####################
# Correctly handle lists
elif isinstance(cur_attr, list):
l=[]
for j in cur_attr:
if isinstance(j,Record):
l.append(dict(j))
else:
#Handle list of non-Records. tags are list of strings
l.append(j)
yield i, l
#####################
else:
yield i, cur_attr
The text was updated successfully, but these errors were encountered:
When casting a record as dict, any lists within the record are not converted to dicts.
An example of this is tagged_vlans for interfaces.
The following update to the Record iter resolves the issue:
The text was updated successfully, but these errors were encountered: