Skip to content

Commit 24741d2

Browse files
committed
Fix cache
1 parent 190b76f commit 24741d2

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ minversion = 3.7
33
log_cli=true
44
python_files = test_*.py
55
;pytest_plugins = ['pytest_profiling']
6-
;addopts = -n 4 --dist loadscope
6+
addopts = -n 4 --dist loadscope

src/superannotate/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55

6-
__version__ = "4.4.32dev3"
6+
__version__ = "4.4.3dev2"
77

88

99
os.environ.update({"sa_version": __version__})

src/superannotate/lib/infrastructure/query_builder.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,21 @@ def __init__(
172172
self._service_provider = service_provider
173173
self._entity = entity
174174
self._parent = parent
175+
self._team_id = team_id
176+
self._project_id = project_id
177+
178+
@property
179+
def pk(self):
180+
if self._entity == CustomFieldEntityEnum.PROJECT:
181+
return self._project_id
182+
if self._parent == CustomFieldEntityEnum.TEAM:
183+
return self._team_id
184+
return self._project_id
175185

176186
def _handle_custom_field_key(self, key) -> Tuple[str, str, Optional[str]]:
177187
for custom_field in sorted(
178188
self._service_provider.list_custom_field_names(
179-
entity=self._entity, parent=self._parent
189+
self.pk, self._entity, parent=self._parent
180190
),
181191
key=len,
182192
reverse=True,

0 commit comments

Comments
 (0)