fix: notion integration (#2888)

This commit is contained in:
Dhruwang Jariwala
2024-07-15 19:59:42 +05:30
committed by GitHub
parent 8ac9b23de3
commit aa495312db
2 changed files with 6 additions and 4 deletions

View File

@@ -227,7 +227,7 @@ const buildNotionPayloadProperties = (
} else {
const value = responses[map.question.id];
properties[map.column.name] = {
[map.column.type]: getValue(map.column.type, processResponseData(value)),
[map.column.type]: getValue(map.column.type, value),
};
}
});
@@ -245,7 +245,9 @@ const getValue = (colType: string, value: string | string[] | number | Record<st
name: value,
};
case "multi_select":
return (value as []).map((v: string) => ({ name: v }));
if (Array.isArray(value)) {
return value.map((v: string) => ({ name: v }));
}
case "title":
return [
{