Fix Other Games and Top Scorers on the national-coach desk

Both screens are identified by the home club in the session; the desktop
check compared against the desk's own runtime club identity after the earlier
Table/Strengths fix, so the national desk was rejected as stale.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-05 12:27:29 +01:00
1 parent f33b381f18
commit 7cc7c3a7ea
1 file changed
+5 -2
+5 -2
View File
@@ -579,7 +579,9 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
opened.identity.runtime_team!=desk.runtime_club||
opened.identity.day_counter!=desk.day_counter||desk.manager_slot<0||
size_t(desk.manager_slot)>=desk.managers.size()||
opened.identity.club_identity!=desk.session_identity_key(size_t(desk.manager_slot)))
// The session identifies the national-coach desk by the home club
// (stable team behind the desk), not by the desk's own runtime club.
opened.identity.club_identity!=desk.managers[size_t(desk.manager_slot)].club_identity_key)
throw FormatError("other games: stale desktop identity");
flow.show_other_games(std::move(opened),session->preparation_projection(revision),result.desk_action);
});
@@ -939,7 +941,8 @@ std::string serve_flow_request(ui::StartupFlow& flow, const ui::FlowResult& resu
opened.identity.day_counter!=desk.day_counter||
desk.manager_slot<0||
size_t(desk.manager_slot)>=desk.managers.size()||
opened.identity.club_identity!=desk.session_identity_key(size_t(desk.manager_slot)))
// Same home-club identity as the session builds for the national desk.
opened.identity.club_identity!=desk.managers[size_t(desk.manager_slot)].club_identity_key)
throw FormatError("top scorers: stale desktop identity");
flow.show_top_scorers(std::move(opened),session->preparation_projection(revision),result.desk_action);
});