Skip to content

Commit a3ba52d

Browse files
sorted inner arrays aswell, fix GET issue (#81)
2 parents 5327e28 + a3fe9b8 commit a3ba52d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dkg/utils/knowledge_collection_tools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,10 @@ def group_nquads_by_subject(nquads_list: list[str], sort: bool = False):
207207

208208
# Return grouped quads (sorted if requested)
209209
grouped_items = sorted(grouped.items()) if sort else grouped.items()
210-
return [quads for _, quads in grouped_items]
210+
if sort:
211+
return [sorted(quads) for _, quads in grouped_items]
212+
else:
213+
return [quads for _, quads in grouped_items]
211214

212215

213216
def calculate_number_of_chunks(quads, chunk_size_bytes=CHUNK_BYTE_SIZE):

0 commit comments

Comments
 (0)