about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/media_attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index a80087fa3..14e6cabae 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -217,7 +217,7 @@ class MediaAttachment < ApplicationRecord
   end
 
   def to_param
-    shortcode
+    shortcode.presence || id&.to_s
   end
 
   def focus=(point)