Browse Source

CLDC-4332: Add the error to role if role is wrong

pull/3305/head
samyou-softwire 3 weeks ago
parent
commit
db52fd5068
  1. 2
      app/models/user.rb

2
app/models/user.rb

@ -418,7 +418,7 @@ private
return if role_is_allowed_to_be_in_organisation?
if role_changed?
errors.add :organisation_id, I18n.t("validations.user.support_user_in_wrong_organisation.change_role")
errors.add :role, I18n.t("validations.user.support_user_in_wrong_organisation.change_role")
else
errors.add :organisation_id, I18n.t("validations.user.support_user_in_wrong_organisation.change_organisation")
end

Loading…
Cancel
Save