mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-13 06:03:49 -05:00
Fix potential inefficiency in media privacy system check (#33858)
This commit is contained in:
parent
38a3e8d0e3
commit
1cf30717db
@ -76,7 +76,7 @@ class Admin::SystemCheck::MediaPrivacyCheck < Admin::SystemCheck::BaseCheck
|
||||
|
||||
def media_attachment
|
||||
@media_attachment ||= begin
|
||||
attachment = Account.representative.media_attachments.first
|
||||
attachment = Account.representative.media_attachments.take
|
||||
if attachment.present?
|
||||
attachment.touch
|
||||
attachment
|
||||
|
Loading…
x
Reference in New Issue
Block a user