Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19 from sue445/fix_error
Browse files Browse the repository at this point in the history
Avoid error
  • Loading branch information
sue445 committed Nov 25, 2023
2 parents e8ff815 + 1758fd2 commit f22e440
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ruby/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ def fill_livestream_response(tx, livestream_model)
end

def fill_livecomment_response(tx, livecomment_model)
# FIXME: livecomment_modelにnilが入っていることがある
# c.f
# * https://github.com/sue445/isucon13-20231125/issues/18
# * https://sue445.sentry.io/share/issue/90a9b3def2814770b1093fbaaa5b874d/
return unless livecomment_model

comment_owner_model = tx.xquery('SELECT * FROM users WHERE id = ?', livecomment_model.fetch(:user_id)).first
comment_owner = fill_user_response(tx, comment_owner_model)

Expand Down

0 comments on commit f22e440

Please sign in to comment.