Skip to content

Commit ebe4ec3

Browse files
committed
Fix "New session" deck stats for installations with Postgres database
Depending on the used database, boolean attributes in the JSON representation returned by the API can be of type integer (`0` or `1`) or boolean (`false` or `true`). Code like `answer_choice.is_correct === 1` does only work for the integer case (Sqlite / MariaDB, where booleans are stored as integer / tinyinteger) but not for `true`/`false` (Postgres, with a distinct boolean type). Fix the definition of the reactive variables by checking for truthiness / falseness instead of explicit integer values. Resolves #819
1 parent 0af425c commit ebe4ec3

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

0 commit comments

Comments
 (0)