diff options
author | Go MAEDA <maeda@farend.jp> | 2022-03-21 06:10:54 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-03-21 06:10:54 +0000 |
commit | ab59d9bf8742eaa382b571a0b590a04092e81dcd (patch) | |
tree | 4ef1f3a2b2961e3459b2e136e053dd6af8bfef0e /app | |
parent | fccc19a4517666aa6736b402c50aecd412bdbe1d (diff) | |
download | redmine-ab59d9bf8742eaa382b571a0b590a04092e81dcd.tar.gz redmine-ab59d9bf8742eaa382b571a0b590a04092e81dcd.zip |
Do not fire a query to get user default query when user has no default query set (#36503).
Patch by Dmitry Makurin.
git-svn-id: https://svn.redmine.org/redmine/trunk@21485 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_query.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 5a3e14474..e7ac1c821 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -80,7 +80,7 @@ class IssueQuery < Query def self.default(project: nil, user: User.current) query = nil # user default - if user&.logged? && (query_id = user.pref.default_issue_query) + if user&.logged? && (query_id = user.pref.default_issue_query).present? query = find_by(id: query_id) end # project default |