Fix "tootctl media remove-orphans" crashing when encountering invalid media (#13170)

Fixes #13168
lolsob-rspec
Eugen Rochko 2020-03-05 15:56:01 +01:00 committed by GitHub
parent 635812f9ea
commit df086209a2
1 changed files with 1 additions and 0 deletions

View File

@ -170,6 +170,7 @@ class MediaAttachment < ApplicationRecord
def variant?(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