diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-03-20 21:38:45 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-03-20 21:38:45 +0000 |
commit | d07c7d8e260eab71a7f6944e4b4b0572f61ce8a6 (patch) | |
tree | 947c816abaaa5cb6608a2f57b6460c4f5e3b19c6 /app/models/issue_query.rb | |
parent | c496879d1f9980dd5e6c644604ce5488ed778af5 (diff) | |
download | redmine-d07c7d8e260eab71a7f6944e4b4b0572f61ce8a6.tar.gz redmine-d07c7d8e260eab71a7f6944e4b4b0572f61ce8a6.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: http://svn.redmine.org/redmine/trunk@21480 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_query.rb')
-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..4ada472e6 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 |