mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-19 07:57:00 +00:00
Fix "tootctl media remove-orphans" crashing when encountering invalid media (#13170)
Fixes #13168
This commit is contained in:
parent
036ba3f510
commit
d081a80cff
|
@ -170,6 +170,7 @@ class MediaAttachment < ApplicationRecord
|
||||||
|
|
||||||
def variant?(other_file_name)
|
def variant?(other_file_name)
|
||||||
return true if file_file_name == other_file_name
|
return true if file_file_name == other_file_name
|
||||||
|
return false if file_file_name.nil?
|
||||||
|
|
||||||
formats = file.styles.values.map(&:format).compact
|
formats = file.styles.values.map(&:format).compact
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue