Browse Source

Update validation error message for duplicate change dates in organisation name changes

pull/3053/head
Manny Dinssa 3 weeks ago
parent
commit
24e0871e6b
  1. 2
      app/models/organisation_name_change.rb

2
app/models/organisation_name_change.rb

@ -74,7 +74,7 @@ private
return if change_date.blank?
if organisation.organisation_name_changes.visible.select(&:persisted?).any? { |record| record.change_date == change_date }
errors.add(:change_date, "Start date cannot be the same as an existing name change.")
errors.add(:change_date, "Start date cannot be the same as another name change.")
end
end

Loading…
Cancel
Save