Commit 3fd460eb authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'kerrizor-protect-against-missing-namespace_settings' into 'master'

Guard against missing namespace_settings

See merge request gitlab-org/gitlab!72785
parents ecbb7f37 a7246f95
...@@ -930,9 +930,13 @@ module EE ...@@ -930,9 +930,13 @@ module EE
end end
end end
# Return the group's setting for delayed deletion, false for user namespace projects # Return the group's setting for delayed deletion, false for user namespace
# projects
#
def group_deletion_mode_configured? def group_deletion_mode_configured?
group && group.namespace_settings.delayed_project_removal? return false unless group&.namespace_settings
group.namespace_settings.delayed_project_removal?
end end
def latest_ingested_security_pipeline def latest_ingested_security_pipeline
......
...@@ -2953,7 +2953,7 @@ RSpec.describe Project do ...@@ -2953,7 +2953,7 @@ RSpec.describe Project do
end end
it 'deletes immediately' do it 'deletes immediately' do
expect(user_project.adjourned_deletion?).to be nil expect(user_project.adjourned_deletion?).to be_falsey
end end
end end
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