summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-03-21 06:10:54 +0000
committerGo MAEDA <maeda@farend.jp>2022-03-21 06:10:54 +0000
commitab59d9bf8742eaa382b571a0b590a04092e81dcd (patch)
tree4ef1f3a2b2961e3459b2e136e053dd6af8bfef0e /app
parentfccc19a4517666aa6736b402c50aecd412bdbe1d (diff)
downloadredmine-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.rb2
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