Flagging a certain topic leads to "500 error": recalculate_score

On our instance, we get this error message when a user tries to flag a certain post (which was reviewed for containing a watched word before).

NoMethodError (undefined method `recalculate_score' for nil:NilClass)
app/models/reviewable.rb:182:in `needs_review!'
lib/post_action_creator.rb:330:in `create_reviewable'
lib/post_action_creator.rb:113:in `perform'
app/controllers/post_actions_controller.rb:22:in `create'
app/controllers/application_controller.rb:397:in `block in with_resolved_locale'
app/controllers/application_controller.rb:397:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:355:in `call'
config/initializers/008-rack-cors.rb:25:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'

Iā€™m worried other topics may be problematic like this as well - any pointers to investigate why the reviewable seems to fail to exist?

1 Like