nossas / bonde-server

API Rails
GNU General Public License v3.0
8 stars 5 forks source link

NoMethodError: undefined method `join' for nil:NilClass #524

Open lpirola opened 5 years ago

lpirola commented 5 years ago

https://sentry.io/organizations/nossas/issues/1037345155/?referrer=github_plugin

NoMethodError: undefined method `join' for nil:NilClass
  app/models/form_entry.rb:44:in `last_name'
    (complete.split(' ')[1..-1]).join(' ') if complete
  app/models/form_entry.rb:51:in `complete_name'
    "#{(first_name || '').strip} #{last_name || ''}".strip
  app/controllers/mobilizations/form_entries_controller.rb:38:in `create'
    (render json: @form_entry.errors, status: 400 and return) unless @form_entry.validate
...
(100 additional frame(s) were not displayed)

NoMethodError: undefined method `join' for nil:NilClass