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
{{ message }}
Repository navigation
ContainerHelper does not look right that .container returns None #199
classContainerHelper:
"""Helper class to allow multidict containers without breaking compatibility with old versions"""def__init__(self, container) ->None:
self.container=container# support for getitemself.container_dict= {key: value.assetforkey, valueincontainer}
self.path_dict= {value.asset.path_id: value.assetforkey, valueincontainer}
...
def__getitem__(self, key):
returnself.container_dict[key]
Bug
Expected: the container path, just as the non-null values before ContainerHelper was implemented
Actual: None
container property retrieves the value from ContainerHelper by path_id as key, which in ContainerHelper find the key from container_dict internally.
However, container_dictuses the container path as key, so path_id probably does not exist in the key list.
The supposed routine is to retrieve the container path from path_id. container_dict returns the object by container path, and path_dict returns the object by path_id.
Therefore, probably a dict mapping path_id to key is needed instead.
Activity