This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
Can ember data handle failing more gracefully when underlying data is deleted? #382
Labels
help wanted
indicates that an issue is open for contributions
My system has a patient document that is completely deleted. That delete didn't cascade to things like the imaging request queue. As a result, my imaging index route isn't rendering.
Expected behavior:
Imaging index route renders, regardless of data issues.
Actual behavior:
Error.
Console is producing the following error message.
Error while processing route: imaging.index Assertion Failed: You looked up the 'patient' relationship on a 'imaging' with id 6C16C18A-1FCE-35A0-9777-47DD2F55C957 but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (
DS.belongsTo({ async: true })
) Error: Assertion Failed: You looked up the 'patient' relationship on a 'imaging' with id 6C16C18A-1FCE-35A0-9777-47DD2F55C957 but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (DS.belongsTo({ async: true })
)Steps to reproduce:
Enter a patient, enter a visit and imaging request. Don't fulfill it. Delete the patient. Go back to the imaging index route. Error!!
The text was updated successfully, but these errors were encountered: