-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
prio: p2Medium priority, normal queueMedium priority, normal queuesize: sSmall, quick fixSmall, quick fixstatus: readyReady to be worked onReady to be worked ontype: bugSomething isn't workingSomething isn't working
Description
Problem
The Granola API returns calendar data with Google Calendar field naming conventions (camelCase), including backgroundColor. Our model struct has background_color: Option<String> but does NOT have a #[serde(alias = "backgroundColor")] attribute on it (unlike other CalendarEvent fields which do have aliases).
The Calendar struct uses #[serde(flatten)] for its extra HashMap, so backgroundColor from the API may be silently captured in extra rather than populating the background_color field. If so, the DB column background_color would always be NULL even when the API provides the value.
Investigation steps
- Check if
serde_jsonwith#[serde(flatten)]onCalendarcapturesbackgroundColorinextraor maps it tobackground_color - Query the local DB:
SELECT background_color FROM calendars WHERE background_color IS NOT NULL— if all NULL, the field isn't being mapped - Use
scripts/granola-api.pyto inspect raw calendar API responses and confirm the field name - If mismatched, add
#[serde(alias = "backgroundColor")]to the field or rename appropriately
Related
- #241 — parent audit issue
- Discovered during field name mismatch audit
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio: p2Medium priority, normal queueMedium priority, normal queuesize: sSmall, quick fixSmall, quick fixstatus: readyReady to be worked onReady to be worked ontype: bugSomething isn't workingSomething isn't working