diff --git a/app/models/partner.rb b/app/models/partner.rb index 858d01a67e..15979d9d02 100644 --- a/app/models/partner.rb +++ b/app/models/partner.rb @@ -27,7 +27,8 @@ class Partner < ApplicationRecord "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ].freeze - enum :status, { uninvited: 0, invited: 1, awaiting_review: 2, approved: 3, error: 4, recertification_required: 5, deactivated: 6 } + # Status `4` (error) was removed for being obsolete but is intentionally skipped to preserve existing enum values. + enum status: { uninvited: 0, invited: 1, awaiting_review: 2, approved: 3, recertification_required: 5, deactivated: 6 } belongs_to :organization belongs_to :partner_group, optional: true diff --git a/app/views/partners/_statuses.html.erb b/app/views/partners/_statuses.html.erb index fcedc452c6..1f5f0432c0 100644 --- a/app/views/partners/_statuses.html.erb +++ b/app/views/partners/_statuses.html.erb @@ -2,8 +2,7 @@ "uninvited": 'ban', "invited": 'envelope', "awaiting_review": 'question-circle', - "approved": 'check-circle', - "error": 'exclamation-circle' + "approved": 'check-circle' }.with_indifferent_access current_filtered_status = params.dig(:filters, :by_status) %> diff --git a/spec/models/partner_spec.rb b/spec/models/partner_spec.rb index a3e0a06060..fe2856794d 100644 --- a/spec/models/partner_spec.rb +++ b/spec/models/partner_spec.rb @@ -131,7 +131,6 @@ expect(build(:partner, status: :invited)).not_to be_deletable expect(build(:partner, status: :awaiting_review)).not_to be_deletable expect(build(:partner, status: :approved)).not_to be_deletable - expect(build(:partner, status: :error)).not_to be_deletable expect(build(:partner, status: :recertification_required)).not_to be_deletable expect(build(:partner, status: :deactivated)).not_to be_deletable end @@ -191,7 +190,6 @@ it 'should return false', :aggregate_failures do expect(build(:partner, status: :uninvited)).not_to be_approvable expect(build(:partner, status: :approved)).not_to be_approvable - expect(build(:partner, status: :error)).not_to be_approvable expect(build(:partner, status: :recertification_required)).not_to be_approvable expect(build(:partner, status: :deactivated)).not_to be_approvable end