1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00: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:
Go MAEDA 2024-06-25 02:09:40 +00:00
parent ccec22eaad
commit b5078e314a

View File

@ -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