Commit d1164bd7 authored by Toon Claes's avatar Toon Claes

Do not write rss_token when in read-only

Closes gitlab-org/gitlab-ee#2855.
parent 3573f63a
...@@ -1079,6 +1079,8 @@ class User < ActiveRecord::Base ...@@ -1079,6 +1079,8 @@ class User < ActiveRecord::Base
# we do this on read since migrating all existing users is not a feasible # we do this on read since migrating all existing users is not a feasible
# solution. # solution.
def rss_token def rss_token
return read_attribute(:rss_token) if Gitlab::Database.readonly?
ensure_rss_token! ensure_rss_token!
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment