conservancy / reimbursinator

Git Up GitHub: https://GiveUpGitHub.org
https://GiveUpGitHub.org
GNU Affero General Public License v3.0
7 stars 6 forks source link

Policy error handling implemented #109

Closed danieldupriest closed 5 years ago

danieldupriest commented 5 years ago

Any errors that occur when accessing the policy file will now fail silently, allowing the user to view, edit and submit reports created with different policy files. The only feature that will break is rule violations. If a section has changed or no longer exists, that section's rules will simply not appear in the UI or in emailed reports. To test:

  1. Ensure your .env file has the correct contents
  2. Start dev server with python manage.py runserver and create a report using Postman.
  3. Delete several sections of the policy file.
  4. Start docker, log in, and try viewing, editing, saving, and finally submitting the old report.
  5. It should act normally, except for rule violations, which will no longer appear.
danieldupriest commented 5 years ago

Whenever a Pipfile dependency is changed you need to rerun pipenv install. This doesn't happen too often, so normally pipenv shell will run with no problem.