Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle case data without classifications #119

Closed
gbp opened this issue Dec 18, 2024 · 0 comments · Fixed by #120
Closed

Handle case data without classifications #119

gbp opened this issue Dec 18, 2024 · 0 comments · Fixed by #120
Labels
bug Something isn't working

Comments

@gbp
Copy link
Member

gbp commented Dec 18, 2024

A NoMethodError occurred in background:

  undefined method `[]' for nil:NilClass
  gems/icasework-0.1.1/lib/icasework/case.rb:33:in `case_data'

-------------------------------
Backtrace:
-------------------------------

  gems/icasework-0.1.1/lib/icasework/case.rb:33:in `case_data'
  gems/icasework-0.1.1/lib/icasework/case.rb:15:in `block in where'
  gems/icasework-0.1.1/lib/icasework/case.rb:15:in `map'
  gems/icasework-0.1.1/lib/icasework/case.rb:15:in `where'
  app/models/case_management/icasework.rb:39:in `published_requests'
  app/services/disclosure_log.rb:29:in `import'
  app/services/disclosure_log.rb:19:in `import!'
  app/workers/import_disclosure_log_worker.rb:11:in `perform'

Seems to be due to cases not being classified within iCasework. We should handle this gracefully.

@gbp gbp added the bug Something isn't working label Dec 18, 2024
gbp added a commit that referenced this issue Dec 18, 2024
Prevent errors when case data doesn't have classifications or documents.

Fixes #119
@gbp gbp closed this as completed in db22e43 Dec 18, 2024
gbp added a commit to mysociety/foi-for-councils that referenced this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant