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

Allow /find form to handle omitted age range. #1162

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

abandoned-prototype
Copy link
Collaborator

Fixes issue

An issue was introduced in #1155, where the default values for the age fields in the FindOfficerForm were removed. This leads to validation errors when submitting the form without setting an age.
This can be verified here: https://staging.openoversight.com/find (pressing "Generate Officer Gallery" will show the validation error)

find-form-age-bug

Description of Changes

Adding the Optional() validator will prevent this issue.

Tests and Linting

  • This branch is up-to-date with the develop branch.
  • Ran make create_db_diagram command.
  • pytest passes on my local development environment.
  • pre-commit passes on my local development environment.

Copy link
Collaborator

@sea-kelp sea-kelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this! :)

@michplunkett michplunkett merged commit e2adc6b into develop Mar 3, 2025
4 checks passed
@michplunkett michplunkett deleted the fix/find-form-age branch March 3, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants