From abcd41e9f6f0f0f76a1254319931cd80b9a9ed63 Mon Sep 17 00:00:00 2001 From: MishNajam <61416092+MishNajam@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:46:53 +0000 Subject: [PATCH] Revert counting attorneys by appointmentType --- lambda/create/validate.go | 6 +++--- lambda/create/validate_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lambda/create/validate.go b/lambda/create/validate.go index 30b15178..d4a6fab0 100644 --- a/lambda/create/validate.go +++ b/lambda/create/validate.go @@ -81,10 +81,10 @@ func Validate(lpa shared.LpaInit) []shared.FieldError { func countAttorneys(as []shared.Attorney, ts []shared.TrustCorporation) (actives, replacements int) { for _, a := range as { - switch a.AppointmentType { - case shared.AppointmentTypeOriginal: + switch a.Status { + case shared.AttorneyStatusActive: actives++ - case shared.AppointmentTypeReplacement: + case shared.AttorneyStatusReplacement: replacements++ } } diff --git a/lambda/create/validate_test.go b/lambda/create/validate_test.go index a2ef9d6b..49a6b7e2 100644 --- a/lambda/create/validate_test.go +++ b/lambda/create/validate_test.go @@ -105,9 +105,9 @@ func TestCountAttorneys(t *testing.T) { assert.Equal(t, 0, replacements) actives, replacements = countAttorneys([]shared.Attorney{ - {AppointmentType: shared.AppointmentTypeReplacement}, - {AppointmentType: shared.AppointmentTypeOriginal}, - {AppointmentType: shared.AppointmentTypeReplacement}, + {Status: shared.AttorneyStatusReplacement}, + {Status: shared.AttorneyStatusActive}, + {Status: shared.AttorneyStatusReplacement}, }, []shared.TrustCorporation{ {Status: shared.AttorneyStatusReplacement}, {Status: shared.AttorneyStatusActive},