Commit cba99501 authored by charlie ablett's avatar charlie ablett

Modify error message for clarity

Removes a double negative

Changelog: fixed
parent 02ab3b58
...@@ -566,7 +566,7 @@ class Namespace < ApplicationRecord ...@@ -566,7 +566,7 @@ class Namespace < ApplicationRecord
end end
if user_namespace? if user_namespace?
errors.add(:parent_id, _('cannot not be used for user namespace')) errors.add(:parent_id, _('cannot be used for user namespace'))
elsif group_namespace? elsif group_namespace?
errors.add(:parent_id, _('user namespace cannot be the parent of another namespace')) if parent.user_namespace? errors.add(:parent_id, _('user namespace cannot be the parent of another namespace')) if parent.user_namespace?
end end
......
...@@ -39862,6 +39862,9 @@ msgstr "" ...@@ -39862,6 +39862,9 @@ msgstr ""
msgid "cannot be modified" msgid "cannot be modified"
msgstr "" msgstr ""
msgid "cannot be used for user namespace"
msgstr ""
msgid "cannot block others" msgid "cannot block others"
msgstr "" msgstr ""
...@@ -39877,9 +39880,6 @@ msgstr "" ...@@ -39877,9 +39880,6 @@ msgstr ""
msgid "cannot merge" msgid "cannot merge"
msgstr "" msgstr ""
msgid "cannot not be used for user namespace"
msgstr ""
msgid "ciReport|%{degradedNum} degraded" msgid "ciReport|%{degradedNum} degraded"
msgstr "" msgstr ""
......
...@@ -50,10 +50,10 @@ RSpec.describe Namespace do ...@@ -50,10 +50,10 @@ RSpec.describe Namespace do
ref(:project_sti_name) | ref(:user_sti_name) | 'project namespace cannot be the parent of another namespace' ref(:project_sti_name) | ref(:user_sti_name) | 'project namespace cannot be the parent of another namespace'
ref(:project_sti_name) | ref(:group_sti_name) | 'project namespace cannot be the parent of another namespace' ref(:project_sti_name) | ref(:group_sti_name) | 'project namespace cannot be the parent of another namespace'
ref(:project_sti_name) | ref(:project_sti_name) | 'project namespace cannot be the parent of another namespace' ref(:project_sti_name) | ref(:project_sti_name) | 'project namespace cannot be the parent of another namespace'
ref(:group_sti_name) | ref(:user_sti_name) | 'cannot not be used for user namespace' ref(:group_sti_name) | ref(:user_sti_name) | 'cannot be used for user namespace'
ref(:group_sti_name) | ref(:group_sti_name) | nil ref(:group_sti_name) | ref(:group_sti_name) | nil
ref(:group_sti_name) | ref(:project_sti_name) | nil ref(:group_sti_name) | ref(:project_sti_name) | nil
ref(:user_sti_name) | ref(:user_sti_name) | 'cannot not be used for user namespace' ref(:user_sti_name) | ref(:user_sti_name) | 'cannot be used for user namespace'
ref(:user_sti_name) | ref(:group_sti_name) | 'user namespace cannot be the parent of another namespace' ref(:user_sti_name) | ref(:group_sti_name) | 'user namespace cannot be the parent of another namespace'
ref(:user_sti_name) | ref(:project_sti_name) | nil ref(:user_sti_name) | ref(:project_sti_name) | nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment