Closed max-lt closed 14 hours ago
Issue il linked to hardcoded 'en'
in the query, and btc205 has no english version ...
We could have same issue with the "getTickets" query that uses 'en'.
We need to update these 2 queries to make the code more robust to "non english" courses.
The
completeChapterProcedure
can fail badly (err: div by zero) when applied to a non-english course; querycompleteChapterQuery
can fail on(chapter_count.completed_count::FLOAT / total_chapters.total)
iftotal_chapters.total
is0
.To reproduce:
You will have a
"division by zero"
error response