Merge pull request #97 from quantified-uncertainty/fix-metaculus-validation

Fix metaculus validation bug
This commit is contained in:
Nuño Sempere 2022-10-26 16:37:17 +01:00 committed by GitHub
commit 8c91993f78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -64,6 +64,7 @@ const predictableProps = {
additionalProperties: true,
},
},
nullable: true,
additionalProperties: true,
},
} as const;

View File

@ -36,7 +36,7 @@ async function apiQuestionToFetchedQuestions(apiQuestion: ApiQuestion): Promise<
const isBinary = q.possibilities.type === "binary";
let options: FetchedQuestion["options"] = [];
if (isBinary) {
const probability = q.community_prediction.full.q2;
const probability = q.community_prediction?.full.q2;
if (probability !== undefined) {
options = [
{