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

NoMethodError: undefined method `fetch' for nil (NoMethodError) #18

Closed
sue445 opened this issue Nov 25, 2023 · 0 comments · Fixed by #19
Closed

NoMethodError: undefined method `fetch' for nil (NoMethodError) #18

sue445 opened this issue Nov 25, 2023 · 0 comments · Fixed by #19

Comments

@sue445
Copy link
Owner

sue445 commented Nov 25, 2023

https://sue445.sentry.io/share/issue/90a9b3def2814770b1093fbaaa5b874d/

NoMethodError: undefined method `fetch' for nil (NoMethodError)

        comment_owner_model = tx.xquery('SELECT * FROM users WHERE id = ?', livecomment_model.fetch(:user_id)).first
                                                                                             ^^^^^^
  app.rb:154:in `fill_livecomment_response'
    comment_owner_model = tx.xquery('SELECT * FROM users WHERE id = ?', livecomment_model.fetch(:user_id)).first
  app.rb:171:in `fill_livecomment_report_response'
    livecomment = fill_livecomment_response(tx, livecomment_model)
  app.rb:504:in `block (3 levels) in <class:App>'
    fill_livecomment_report_response(tx, report_model)
  app.rb:503:in `each'
    tx.xquery('SELECT * FROM livecomment_reports WHERE livestream_id = ?', livestream_id).map do |report_model|
  app.rb:503:in `map'
    tx.xquery('SELECT * FROM livecomment_reports WHERE livestream_id = ?', livestream_id).map do |report_model|
...
(78 additional frame(s) were not displayed)
sue445 added a commit that referenced this issue Nov 25, 2023
@sue445 sue445 mentioned this issue Nov 25, 2023
sue445 added a commit that referenced this issue Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant