Unfortunately, as Julien found, mysql translates != 1 to = !1 to = 0 and this makes the query for sample.distractor field not equal to 1 to don't work if the distractor field is equal to NULL, and this happens when boxes are created from the option Create new samples.
This was fixed.
Also, now we consider the edge case when all the samples are distractors in the box used to generate the report. This is not a use case that is expected but nothing blocks the user to do that.
Unfortunately, as Julien found, mysql translates != 1 to = !1 to = 0 and this makes the query for
sample.distractor
field not equal to 1 to don't work if the distractor field is equal to NULL, and this happens when boxes are created from the optionCreate new samples
.This was fixed.
Also, now we consider the edge case when all the samples are distractors in the box used to generate the report. This is not a use case that is expected but nothing blocks the user to do that.