diff --git a/src/notion/fetch/fetchFamiliesWithEventsFromNotion.ts b/src/notion/fetch/fetchFamiliesWithEventsFromNotion.ts index 7e2f97e..efb5043 100644 --- a/src/notion/fetch/fetchFamiliesWithEventsFromNotion.ts +++ b/src/notion/fetch/fetchFamiliesWithEventsFromNotion.ts @@ -34,12 +34,14 @@ export async function fetchFamiliesWithEventsFromNotion( return buildFamilyEvent(pageObjectResponse); }); - const families: Famille[] = await Promise.all( + const familles: Famille[] = await Promise.all( familyPages.map((pageObjectResponse) => { return buildFamily(pageObjectResponse, familyEvents); }) ); - return families; + // Fix to remove the empty "Famille de résistant" page that is often created by mistake + const filtered = familles.filter(f => f.Titre !== "Famille de résistant"); + return filtered; } function buildFamilyEvent(page: PageObjectResponse): EvenementFamille {