Skip to content

Commit e9af22f

Browse files
Copilotpethers
andauthored
Make committee roster fallback authoritative from MEP details
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
1 parent 5d092dd commit e9af22f

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/clients/ep/committeeClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export class CommitteeClient extends BaseEPClient {
275275
if (this.hasMembershipSummary(detailsMembershipSummary)) {
276276
return { mepId, ...detailsMembershipSummary };
277277
}
278-
return { mepId, member: true, chair: false, viceChair: false };
278+
return { mepId, member: false, chair: false, viceChair: false };
279279
}
280280

281281
private async resolveDetailMembershipSummary(

src/clients/europeanParliamentClient.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ describe('EuropeanParliamentClient', () => {
12481248
expect(result.members).toContain('person/1000');
12491249
});
12501250

1251-
it('should include committee members even when MEP detail lookups fail', async () => {
1251+
it('should not include members when MEP detail lookups fail to establish committee membership', async () => {
12521252
mockFetch.mockResolvedValueOnce({
12531253
ok: true,
12541254
headers: new Headers(),
@@ -1283,7 +1283,9 @@ describe('EuropeanParliamentClient', () => {
12831283

12841284
const result = await client.getCommitteeInfo({ abbreviation: 'ENVI' });
12851285

1286-
expect(result.members).toEqual(['person/124810']);
1286+
expect(result.members).toEqual([]);
1287+
expect(result.chair).toBeUndefined();
1288+
expect(result.viceChairs).toEqual([]);
12871289
});
12881290

12891291
it('should normalize full URI MEP ids before loading MEP details', async () => {

0 commit comments

Comments
 (0)