Commit 5ded4737 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'ashmckenzie/fix-editing-group-without-existing-saved-settings' into 'master'

Namespace settings don't always exist for a group

See merge request gitlab-org/gitlab!50353
parents 95756071 7ea71835
...@@ -18,6 +18,6 @@ ...@@ -18,6 +18,6 @@
- unless group.has_parent? - unless group.has_parent?
.form-group .form-group
.form-check .form-check
= f.check_box :allow_mfa_for_subgroups, class: 'form-check-input', checked: group.namespace_settings.allow_mfa_for_subgroups = f.check_box :allow_mfa_for_subgroups, class: 'form-check-input', checked: group.namespace_settings&.allow_mfa_for_subgroups
= f.label :allow_mfa_for_subgroups, class: 'form-check-label' do = f.label :allow_mfa_for_subgroups, class: 'form-check-label' do
= _('Allow subgroups to set up their own two-factor authentication rules') = _('Allow subgroups to set up their own two-factor authentication rules')
...@@ -113,6 +113,7 @@ class Gitlab::Seeder::Projects ...@@ -113,6 +113,7 @@ class Gitlab::Seeder::Projects
group.save! group.save!
group.add_owner(User.first) group.add_owner(User.first)
group.create_namespace_settings
end end
project_path.gsub!(".git", "") project_path.gsub!(".git", "")
......
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