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.
DashboardQuery.upcoming_eventseager-loads:workshop_hosttogether with:sponsorsin one join (app/queries/dashboard_query.rb:5-6). Both associations route through theworkshop_sponsorstable, so the scopedhas_onefalls into the same eager-load alias trap documented in #2975:workshop_hostcomes 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:sponsorsin the join, move the host to preload:Worth confirming first whether the dashboard card actually renders the wrong venue when
workshop_hostis lost (follow the same repro sketch as #2975), or only shows no venue.