Skip to content

Commit 6ccd0bc

Browse files
committed
Fixed subset query
1 parent 5b3ab3e commit 6ccd0bc

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

pytest.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@ log_cli=true
44
python_files = test_*.py
55
;pytest_plugins = ['pytest_profiling']
66
;addopts = -n auto --dist=loadscope
7-

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ def search_items(
26582658
i.path = path
26592659
items.extend(_items)
26602660
else:
2661-
path = f"{project.name}{f'/{folder}' if not folder.is_root else ''}"
2661+
path = f"{project.name}{f'/{folder.name}' if not folder.is_root else ''}"
26622662
items = self.controller.items.list_items(project, folder, **query_kwargs)
26632663
for i in items:
26642664
i.path = path

src/superannotate/lib/core/usecases/items.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ def __query(self, path, items):
883883
queried_items = queried_items.data
884884
# Adding the images missing from specified folder to 'skipped'
885885
tmp = {item["name"]: item for item in items["items"]}
886-
tmp_q = {x.name for x in queried_items}
886+
tmp_q = {x["name"] for x in queried_items}
887887

888888
for i, val in tmp.items():
889889
if i not in tmp_q:
@@ -892,9 +892,9 @@ def __query(self, path, items):
892892
# Adding ids to path_separated to later see if they've succeded
893893

894894
self.path_separated[path] = [
895-
{"id": x.id, "name": x.name, "path": x.path} for x in queried_items
895+
{"id": x["id"], "name": x["name"], "path": x["path"]} for x in queried_items
896896
]
897-
return [x.id for x in queried_items]
897+
return [x["id"] for x in queried_items]
898898

899899
def __distribute_to_results(self, item_id, response, item):
900900

0 commit comments

Comments
 (0)