Skip to content
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

Closed
tangollama opened this issue Mar 19, 2016 · 1 comment
Labels
help wanted indicates that an issue is open for contributions

Comments

@tangollama
Copy link
Member

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!!

@jkleinsc
Copy link
Member

I am closing this issue because #380 and #381 makes sure that this issue doesn't happen any more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted indicates that an issue is open for contributions
Projects
None yet
Development

No branches or pull requests

3 participants