Skip to content

Commit

Permalink
Use tuple key
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderVertegaal committed Aug 23, 2024
1 parent 7fcbb11 commit 2bc240b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/aethel_db/views/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def get_or_create_result(
new_phrase = AethelListPhrase(items=items)

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

new_result = AethelListResult(phrase=new_phrase, type=type, sampleCount=0)
Expand Down

0 comments on commit 2bc240b

Please sign in to comment.