mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Add MediaAttachment.combined_media_file_size method (#35570)
This commit is contained in:
parent
8896d6c1b1
commit
3146109b08
5 changed files with 18 additions and 6 deletions
|
|
@ -313,9 +313,7 @@ module Mastodon::CLI
|
|||
end
|
||||
|
||||
def combined_media_sum
|
||||
Arel.sql(<<~SQL.squish)
|
||||
COALESCE(file_file_size, 0) + COALESCE(thumbnail_file_size, 0)
|
||||
SQL
|
||||
MediaAttachment.combined_media_file_size
|
||||
end
|
||||
|
||||
def preload_records_from_mixed_objects(objects)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue