-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Multiple items with same name from different providers #448
Conversation
if pitem is not None: | ||
# If the item already exists, merge or override it | ||
if item.name in uniq: | ||
pitem = uniq[item.name] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep pitem = uniq.get(item.name)
and test for a None ... it does the same with the half of the cost.
This is probably fine. I didn't look into the code much but I tested it on a library example. However, I found that subscribing to the library in the filesystem provider is broken and it is because of this MR: #407 Let's sum up asab.library functionality and discuss testing suits - manual or unit tests. It is becoming more and more important.
|
asab/library/service.py
Outdated
@@ -236,10 +229,9 @@ async def list(self, path="/", tenant=None, recursive=False) -> list: | |||
child_items = await self._list(item.name, tenant, providers=item.providers) | |||
items.extend(child_items) | |||
recitems.extend(child_items) | |||
|
|||
print(items) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove print
It is ok, I can see just one file from one layer. |
It is OK for now. It could be refined in the future. |
No description provided.