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},