Tags: lucyparsons/OpenOversight
Tags
Add user profile tests (#1119) ## Fixes issue #436 ## Description of Changes Added tests to validate `/user/` route logic and correct profile logic to match pre-specified tests. <img width="497" alt="Screenshot 2024-07-31 at 5 27 37 PM" src="https://github.com/user-attachments/assets/78703665-1623-4703-8fa9-a1cca59ba319"> There is not a `/users/` route, so I marked it out. ## Tests and Linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment.
Fix upload bug (#1095) ## Description of Changes *Cherry-pick of OrcaCollective#434 * Fixed bug introduced in #1018 where anonymous uploads were silently failing due to misplaced `@login_required` decorator * Audited all other redirect routes * Fixed note_detail.html and description_detail.html ## Notes for Deployment None! ## Screenshots (if appropriate) N/A ## Tests and Linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment.
Fix `Departments` pagination automatic filter application (#1078) ## Fixes issue Fixes #1077 ## Description of Changes Changes check if there are "filters" being applied to the list given in the `departments` view. If there are no filters applied then we generate a "next" link that does not automatically apply filters. ## Tests and linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment. --------- Co-authored-by: sea-kelp <[email protected]>
Make url_for work with all endpoints (#1070) ## Description of Changes Some of the `ModelView` based endpoints were missing a distinct name that could be used for `url_for`, and instead string concatenation was used (mostly in templates). I also moved some logic out of templates (e.g. calculation of total pay), added helper methods and made some other changed to reduce the code needed in the templates and improve readability a little bit. I also added an anonymous user class that is useful to call things like `.is_admin_or_coordinator(department)` on any `current_user` object, without first making sure the user is not anonymous. ## Tests and linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment.
Fix production deployments (#1066) ## Fixes issue Prod deploy failed. ## Description of Changes Pushing into the main branch is now longer required for production deployments, but the task.py script was hard-coded to fetch the (out of date) main branch. After this change, the script will now fetch the given git ref, in the prod deploy case this is the tag used in the release.
Deploy to prod on tag creation (#1064) ## Fixes issue #1030 ## Description of Changes Previously a push on the main branch triggered a deploy to prod. In the future, creating a release will trigger that push. The change is already built in a way that we can delete the main branch and rename the develop branch to main as a next step (once we confirmed everything works).
PreviousNext