DashboardQuery eager-loads workshop_host with :sponsors in one join (same host-loss trap as #2975)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 app/queries/dashboard_query.rb:5-6 开始,并将 DashboardQuery.upcoming_events 与 #2981 中的事件列表模式 Listable.most_recent 进行比较。使用 #2975 中的草图复现 workshop-host 的行为,然后应用建议的 eager-load/preload 安排,验证 dashboard 卡片中的场地输出。
由索引模型根据 Issue 内容生成。
描述
DashboardQuery.upcoming_events eager-loads :workshop_host together with :sponsors in one join (app/queries/dashboard_query.rb:5-6). Both associations route through the workshop_sponsors table, so the scoped has_one falls into the same eager-load alias trap documented in #2975: workshop_host comes back nil or points at a non-host sponsor, on a plan-dependent subset of workshops.
Suggested fix: the same pattern the events listing now uses (#2981, Listable.most_recent) — keep :sponsors in the join, move the host to preload:
Workshop.eager_load(:chapter, :sponsors, :organisers, :permissions)
.preload(workshop_host: :sponsor)
Worth confirming first whether the dashboard card actually renders the wrong venue when workshop_host is lost (follow the same repro sketch as #2975), or only shows no venue.
- 主要语言
- Ruby
- 星标
- 105
- 派生
- 206
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 74
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codebar/planner 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 30/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
维护者通常 1 天内回复
相似的 Issue
-
Add Zammad可能已有人在做 @Arslan-TR 今天认领。 未关闭request
难度 2/5 1-3 小时 新手友好度 66/100
endoflife-date/endoflife.date#11298 · 1 条评论 ·
维护者通常 1 天内回复
-
performance v/6
难度 2/5 1-3 小时 新手友好度 78/100
WITCodingClub/calendar-backend#689 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 86/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
rubys/roundhouse#571 ·
维护者通常 1 天内回复
-
area/web interface
难度 2/5 1-3 小时 新手友好度 78/100
mastodon/mastodon#40924 · 1 条评论 ·
维护者通常 1 天内回复