feat: posts.thumbnail_base を Nullable に(#75) (#198)

Merge remote-tracking branch 'origin/main' into feature/075

#75

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #198
This commit was merged in pull request #198.
This commit is contained in:
2026-01-06 12:43:22 +09:00
parent 49888627c9
commit 3f2c0a52b9
4 changed files with 31 additions and 4 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ namespace :nico do
unless post
title = datum['title']
url = "https://www.nicovideo.jp/watch/#{ datum['code'] }"
thumbnail_base = fetch_thumbnail.(url) || '' rescue ''
thumbnail_base = fetch_thumbnail.(url) rescue nil
post = Post.new(title:, url:, thumbnail_base:, uploaded_user: nil)
if thumbnail_base.present?
post.thumbnail.attach(