instedd / cdx

Connected Diagnostics Platform
https://cdx.io
9 stars 7 forks source link

Fixes over distractor samples values on report creation #1977

Closed leandroradusky closed 1 year ago

leandroradusky commented 1 year ago

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.