Skip to content

Fix missing avatars key crashing shared gem fetch - #106

Merged
JakesMD merged 1 commit into
mainfrom
hotfix/shared-gem-avatars-key
Jul 18, 2026
Merged

Fix missing avatars key crashing shared gem fetch#106
JakesMD merged 1 commit into
mainfrom
hotfix/shared-gem-avatars-key

Conversation

@JakesMD

@JakesMD JakesMD commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • fetch_gem_with_people built each person's JSON from the raw people row, omitting the avatars key the Dart client model requires (CPeopleTable.avatars is a required PgJoinToMany), causing "The key 'avatars' was not found in the JSON data." when viewing a shared gem that has a person assigned to a line.
  • Added avatars: null to each person object, mirroring the existing gem_share_tokens fix on the gem object.
  • Added a pgTAP assertion covering the avatars key presence.

Test plan

  • hobnob db:test — all pgTAP tests pass (19/19)
  • Manually reproduced via flutter run -d chrome: seeded a gem/line/person/share-token in local Postgres, loaded /#/shared-gem?token=..., confirmed the page renders with no error and CPerson.avatars is []

@JakesMD
JakesMD merged commit 31b4b9e into main Jul 18, 2026
1 of 2 checks passed
@JakesMD
JakesMD deleted the hotfix/shared-gem-avatars-key branch July 18, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant