Skip to content

Commit 2bc240b

Browse files
Use tuple key
1 parent 7fcbb11 commit 2bc240b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/aethel_db/views/list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def get_or_create_result(
6060
new_phrase = AethelListPhrase(items=items)
6161

6262
# Construct a unique 'key' for every combination of word, lemma and type, so we can group samples.
63-
key_word = " ".join([item.word for item in phrase.items])
64-
key_lemma = " ".join([item.lemma for item in phrase.items])
63+
key_word = tuple(item.word for item in phrase.items)
64+
key_lemma = tuple(item.lemma for item in phrase.items)
6565
key = (key_word, key_lemma, type)
6666

6767
new_result = AethelListResult(phrase=new_phrase, type=type, sampleCount=0)

0 commit comments

Comments
 (0)