Fix count numbers from ActivityPub not being saved (#4899)
They are marked as read-only by Rails, but we know what we are doing, so we are un-marking them as such. The mastodon:maintenance:update_counter_caches task is not really supposed to be run anymore (it was a one-time thing during an upgrade) however, just in case, I have modified it to not touch ActivityPub accounts. Also, no point writing to logger from these rake tasks, since they are not to be run from cron. Better to give stdout feedback.
This commit is contained in:
parent
0ef9d45d05
commit
0a6b098668
2 changed files with 12 additions and 8 deletions
|
@ -172,6 +172,10 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
class << self
|
||||
def readonly_attributes
|
||||
super - %w(statuses_count following_count followers_count)
|
||||
end
|
||||
|
||||
def domains
|
||||
reorder(nil).pluck('distinct accounts.domain')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue