wevisdemo / they-work-for-us

Thailand's Politician Directory website
https://theyworkforus.wevis.info
31 stars 12 forks source link

bug: หน้า people "สรุปการลงมติในสภา" และหน้า votelog "บันทึกคะแนนเสียง" ไม่แสดง #50

Closed mixth closed 1 year ago

mixth commented 1 year ago

บริเวณด้านล่างนี้ไม่แสดงผล votelog

พบตั้งแต่ commit 53e390c43 เบื้องต้นพบว่า ID ที่ใช้สำหรับ match กับ people-vote ถูกเปลี่ยนไปเป็น UUID e.g. f4c90a40-5485-5959-bcb3-a9ece6b0f871

People

Screenshot 2023-03-18 192941

Votelog

Screenshot 2023-03-18 201058

Th1nkK1D commented 1 year ago

Fixed in a9d4e3d

It took me so long to figure out the problem as you mentioned that the id has become in UUID format since the upgrade. I found a Gatsby plugin that transforms YAML doc describes the behavior of id as follows:

If your data contains an id key the transformer will automatically convert this key to yamlId as id is a reserved internal keyword for Gatsby.

image

So I need to remap the slug and query of the votelog to use yamlId instead of id.