Skip to content

Commit 0fbb0f5

Browse files
committed
Fix pagination issue
1 parent b4c5f83 commit 0fbb0f5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/superannotate/lib/infrastructure/services/item_service.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,14 @@ def list(self, project_id: int, folder_id: Optional[int], query: Query):
103103
char_counter = 0
104104
while values:
105105
val = values.pop()
106-
if char_counter + len(val) < available_slots:
106+
_len = len(str(val)) + 1 # computing ,
107+
if char_counter + _len < available_slots:
107108
current_chunk.append(val)
108-
char_counter += len(val)
109+
char_counter += _len
109110
else:
110111
chunks.append(current_chunk)
111112
current_chunk = [val]
112-
char_counter = len(val)
113+
char_counter = _len
113114
if current_chunk:
114115
chunks.append(current_chunk)
115116
for chunk in chunks:

0 commit comments

Comments
 (0)