Skip to content

Commit

Permalink
Revert counting attorneys by appointmentType
Browse files Browse the repository at this point in the history
  • Loading branch information
MishNajam committed Nov 15, 2024
1 parent 3ada094 commit abcd41e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lambda/create/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
}
}
Expand Down
6 changes: 3 additions & 3 deletions lambda/create/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit abcd41e

Please sign in to comment.