Fix potential inefficiency in media privacy system check (#33858)

pull/33619/head^2
Claire 3 weeks ago committed by GitHub
parent 38a3e8d0e3
commit 1cf30717db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -76,7 +76,7 @@ class Admin::SystemCheck::MediaPrivacyCheck < Admin::SystemCheck::BaseCheck
def media_attachment def media_attachment
@media_attachment ||= begin @media_attachment ||= begin
attachment = Account.representative.media_attachments.first attachment = Account.representative.media_attachments.take
if attachment.present? if attachment.present?
attachment.touch attachment.touch
attachment attachment

Loading…
Cancel
Save