-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix site crash when scenario was deleted from DB #329
Conversation
@annawendler can you checkout this branch and see if it fixes your issue with the updating scenario? |
I still have the issue, when I update the scenario I get the error message "Uncaught TypeError: theme.custom.scenarios[props.scenario.id] is undefined". |
This should be fixed as well. We will rework how scenarios are colored in the future, since we currently assume that the scenarios have rising ids starting from 1. See #330. |
It is fixed now. |
Description
Fixes an issue with the persistent store when a scenario is deleted from the database (scenario ID returns 500 on API fetch).
This issue ocurrs when the redux store still has the scenario id cached in the
activeScenarios
andscenarioList
and the Simulation Chart or Data Cards try to fetch data with this scenario id from the API.To fix this, IDs in the
activeScenarios
are ignored if the ID is not in thesceanrioList
.Additionally the
scenarioList
is not persisted and fetched newly on every load.Checklist
I, the author of this PR checked the following requirements for good software quality:
Unit and/or integration tests have been addedI attached performance measurements to prevent performance degradationI, the reviewer checked the following things: