diff options
author | Go MAEDA <maeda@farend.jp> | 2023-06-29 14:42:54 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-06-29 14:42:54 +0000 |
commit | 945a82b5c0aad6bd6af656865015277d3e0e612b (patch) | |
tree | d6bf1c4e7fdf2bb5d32b55ae7e5c0477b31377c9 /app/models/issue_category.rb | |
parent | ebf3fb3b4fa53f3bc6f9cbbcd529c6b296d4f6fc (diff) | |
download | redmine-945a82b5c0aad6bd6af656865015277d3e0e612b.tar.gz redmine-945a82b5c0aad6bd6af656865015277d3e0e612b.zip |
<=> operator should return nil when invoked with an incomparable object (#38772).
Patch by Go MAEDA.
git-svn-id: https://svn.redmine.org/redmine/trunk@22269 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_category.rb')
-rw-r--r-- | app/models/issue_category.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue_category.rb b/app/models/issue_category.rb index 626bb1449..eadb44891 100644 --- a/app/models/issue_category.rb +++ b/app/models/issue_category.rb @@ -43,6 +43,8 @@ class IssueCategory < ActiveRecord::Base end def <=>(category) + return nil unless category.is_a?(IssueCategory) + name <=> category.name end |