summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/issuable_collections.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/issuable_collections.rb')
-rw-r--r--app/controllers/concerns/issuable_collections.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb
index a597996a362..789e0dc736e 100644
--- a/app/controllers/concerns/issuable_collections.rb
+++ b/app/controllers/concerns/issuable_collections.rb
@@ -126,6 +126,8 @@ module IssuableCollections
sort_param = params[:sort]
sort_param ||= user_preference[issuable_sorting_field]
+ return sort_param if Gitlab::Database.read_only?
+
if user_preference[issuable_sorting_field] != sort_param
user_preference.update_attribute(issuable_sorting_field, sort_param)
end