diff --git a/src/lib/features/project/project-flag-creators-read-model.ts b/src/lib/features/project/project-flag-creators-read-model.ts index 4d24473cef..95c64aa0c8 100644 --- a/src/lib/features/project/project-flag-creators-read-model.ts +++ b/src/lib/features/project/project-flag-creators-read-model.ts @@ -17,6 +17,7 @@ export class ProjectFlagCreatorsReadModel .distinct('users.id') .join('features', 'users.id', '=', 'features.created_by_user_id') .where('features.project', project) + .where('features.archived_at', null) .select([ 'users.id', 'users.name', diff --git a/src/lib/features/project/project-flag-creators.e2e.test.ts b/src/lib/features/project/project-flag-creators.e2e.test.ts index 23ce401c76..115976fc6f 100644 --- a/src/lib/features/project/project-flag-creators.e2e.test.ts +++ b/src/lib/features/project/project-flag-creators.e2e.test.ts @@ -48,14 +48,12 @@ test('should return flag creators', async () => { }) .expect(200); await app.createFeature('flag-name-2'); + await app.archiveFeature('flag-name-2'); const { body } = await app.request .get('/api/admin/projects/default/flag-creators') .expect('Content-Type', /json/) .expect(200); - expect(body).toEqual([ - { id: 1, name: 'user1@getunleash.io' }, - { id: 2, name: 'user2@getunleash.io' }, - ]); + expect(body).toEqual([{ id: 1, name: 'user1@getunleash.io' }]); });