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


                if key == "images":
                    continue
                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}"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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: mittagessen/kraken
Commit Name: 5eeba7079cf670134c98394bb6b6127634e722f7
Time: 2017-04-11
Author: mittagessen@l.unchti.me
File Name: kraken/kraken.py
Class Name:
Method Name: recognizer


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: d262a0d3c567cf0543760bd238f67411acb697c2
Time: 2020-02-26
Author: 11652964@qq.com
File Name: QUANTAXIS/QAFetch/QAhuobi.py
Class Name:
Method Name: QA_fetch_huobi_kline


Project Name: regel/loudml
Commit Name: bbc70825c6042af761aa816bdf5be153f8e7597c
Time: 2018-08-27
Author: christophe@redmintnetwork.fr
File Name: loudml/loudml/license.py
Class Name: License
Method Name: load