diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-03-05 15:56:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 15:56:01 +0100 |
commit | d081a80cff8e53a0ff48fb4274bc615166478b40 (patch) | |
tree | 0270032026f13874946bc9e4bce8e80519b1963f /app/models | |
parent | 036ba3f51065a96cb9203a9ac5aa71d7d6edeebe (diff) |
Fix "tootctl media remove-orphans" crashing when encountering invalid media (#13170)
Fixes #13168
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/media_attachment.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 42364641f..1e36625ca 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -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 |