diff options
author | Go MAEDA <maeda@farend.jp> | 2022-12-21 02:25:47 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-12-21 02:25:47 +0000 |
commit | 361b285250c01b12d2063049c65b389b05056198 (patch) | |
tree | e0368c117dc9c7f28b8aaaf1b8ae11bd454c444a /app/models/project.rb | |
parent | 4edbefc4638726de41ff09053d539ee3b1e116cb (diff) | |
download | redmine-361b285250c01b12d2063049c65b389b05056198.tar.gz redmine-361b285250c01b12d2063049c65b389b05056198.zip |
Do not break when setting enabled_module_names on a project without a default_member_role (#38064).
Patch by Holger Just.
git-svn-id: https://svn.redmine.org/redmine/trunk@21994 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 81ec37d10..0502ffca1 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -842,7 +842,7 @@ class Project < ActiveRecord::Base if user.admin? true else - default_member_role.has_permission?(:select_project_modules) + default_member_role&.has_permission?(:select_project_modules) end else user.allowed_to?(:select_project_modules, project) |