mirror of
https://github.com/redmine/redmine.git
synced 2026-03-06 12:31:40 +01:00
Creating a new issue fails with an internal error if no issue priorities are defined (#40860).
Patch by Holger Just (@hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@22895 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -2077,7 +2077,7 @@ class Issue < ApplicationRecord
|
||||
tracker.disabled_core_fields.each do |attribute|
|
||||
send :"#{attribute}=", nil
|
||||
end
|
||||
self.priority_id ||= IssuePriority.default&.id || IssuePriority.active.first.id
|
||||
self.priority_id ||= IssuePriority.default&.id || IssuePriority.active.first&.id
|
||||
self.done_ratio ||= 0
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user