28935ea4d7796ada4ad387e79c4357b21c5b9ad6,app/grandchallenge/reader_studies/models.py,ReaderStudy,add_ground_truth,#ReaderStudy#,394

Before Change


                        raise ValidationError(
                            "Expected 1 or 0 for answer type BOOL."
                        )
                    _answer = bool(int(gt[key]))
                else:
                    _answer = gt[key]
                Answer.validate(
                    creator=user,

After Change


                question = self.questions.get(question_text=key)
                _answer = json.loads(gt[key])
                if question.answer_type == Question.ANSWER_TYPE_CHOICE:
                    try:
                        option = question.options.get(title=_answer)
                        _answer = option.pk
                    except CategoricalOption.DoesNotExist:
                        raise ValidationError(
                            f"Option "{_answer}" is not valid for question {question.question_text}"
                        )
                if (
                    question.answer_type
                    == Question.ANSWER_TYPE_MULTIPLE_CHOICE
                ):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: comic/grand-challenge.org
Commit Name: 28935ea4d7796ada4ad387e79c4357b21c5b9ad6
Time: 2020-03-26
Author: 57257130+MikeOverkamp-diag@users.noreply.github.com
File Name: app/grandchallenge/reader_studies/models.py
Class Name: ReaderStudy
Method Name: add_ground_truth


Project Name: idaholab/raven
Commit Name: 469a24b1e61bf1f78897582d9b1e02a83c5117b4
Time: 2019-11-25
Author: paul.talbot@inl.gov
File Name: framework/utils/xmlUtils.py
Class Name:
Method Name: fixXmlTag


Project Name: IDSIA/sacred
Commit Name: b7553ed43b134c67aa72a06aba79c8b63d6bd1be
Time: 2015-10-18
Author: qwlouse@gmail.com
File Name: sacred/config/utils.py
Class Name:
Method Name: normalize_or_die