Skip to content

Commit

Permalink
Add prefix to data quality enum
Browse files Browse the repository at this point in the history
  • Loading branch information
njaeggi committed Jan 6, 2025
1 parent 2f49b1a commit b2c7026
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/sac_cas/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module SacCas::Person
i18n_enum :correspondence, CORRESPONDENCES
i18n_setter :correspondence, CORRESPONDENCES

enum data_quality: {ok: 0, info: 1, warning: 2, error: 3}, _default: 0
enum data_quality: {ok: 0, info: 1, warning: 2, error: 3}, _default: 0, _prefix: :data_quality

reflect_on_attachment(:picture).variant(:profile, resize_to_fill: [200, 200])

Expand Down
2 changes: 1 addition & 1 deletion app/models/wizards/steps/check_data_quality_errors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Wizards::Steps::CheckDataQualityErrors < Wizards::Step
private

def check_data_quality_errors
return unless person.error? || person.household_people.exists?(data_quality: :error)
return unless person.data_quality_error? || person.household_people.exists?(data_quality: :error)

errors.add(:base, :data_quality_error)
end
Expand Down

0 comments on commit b2c7026

Please sign in to comment.