When Prepared Tasks job runs or I access documents attribute on an appeal,
for some reason I get an ActiveRecord error
Reproduction Steps
Scenario 1 -
Go to rails console.
Task.all.sample.appeal.documents until you get more than 0 documents for an appeal
Observe error
Try to run Prepare tasks job
Observe failure
Validated in the following Environment(s)
[ ] Dev
[ ] UAT
[ ] Preprod
[ ] Prod
Logs:
Document list length: 1
ActiveRecord::SubclassNotFound: Invalid single-table inheritance type: Appeal Checklist is not a subclass of Document
from /opt/caseflow-certification/src/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.7.1/lib/active_record/inheritance.rb:215:in `subclass_from_attributes'
from /opt/caseflow-certification/src/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.7.1/lib/active_record/inheritance.rb:55:in `new'
from /opt/caseflow-certification/src/app/models/document.rb:88:in `from_vbms_document'
from /opt/caseflow-certification/src/app/services/external_api/vbms_service.rb:50:in `block in fetch_documents_for'
from /opt/caseflow-certification/src/app/services/external_api/vbms_service.rb:50:in `map'
from /opt/caseflow-certification/src/app/services/external_api/vbms_service.rb:50:in `fetch_documents_for'
from /opt/caseflow-certification/src/app/models/appeal.rb:466:in `fetch_documents_from_service!'
from /opt/caseflow-certification/src/app/models/appeal.rb:474:in `fetched_documents'
from /opt/caseflow-certification/src/app/models/appeal.rb:293:in `fetch_documents!'
from /opt/caseflow-certification/src/app/models/appeal.rb:95:in `documents'
Description
When Prepared Tasks job runs or I access
documents
attribute on an appeal, for some reason I get an ActiveRecord errorReproduction Steps
Scenario 1 -
Validated in the following Environment(s)
Logs:
Sentry:
n/a
Screenshots
Scenario 1 - [TITLE]