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

Support search for items with accents in geolocation module #1352

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

RobertKoikai
Copy link
Contributor

@RobertKoikai RobertKoikai commented Aug 15, 2023

Addresses

Changes

  • Update geo_area_label method to allow for search accents e.g é, ë, ç, ø
  • Enable unaccent extension in postgreSQL

Mention related users here if any.

This PR doesn't introduce any:

  • temporary files, auto-generated files or secret keys
  • n+1 queries
  • flake8 issues
  • print
  • typos
  • unwanted comments

This PR contains valid:

  • tests
  • permission checks (tests here too)
    -[ ] translations

@RobertKoikai RobertKoikai requested a review from thenav56 August 15, 2023 17:29
Copy link
Member

@thenav56 thenav56 left a comment

Choose a reason for hiding this comment

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

Let's add test cases as well.

apps/user/migrations/0004_auto_20171129_0851.py Outdated Show resolved Hide resolved
apps/geo/filter_set.py Outdated Show resolved Hide resolved
apps/geo/filter_set.py Outdated Show resolved Hide resolved
@RobertKoikai
Copy link
Contributor Author

@thenav56 ,
I think the test cases you provided should still work even with the unaccent functionality is applied.

@thenav56
Copy link
Member

@thenav56 , I think the test cases you provided should still work even with the unaccent functionality is applied.

Let's add an accent in the title of the test, this should test this as well.
https://github.com/the-deep/server/blob/develop/apps/geo/tests/test_schemas.py#L61

Update geo filters funtionality

Update migrations

fix flake8 issues

Update the filter set function

Update test cases for filter with accents for geo filters

Remove unaccent extension from migration
@RobertKoikai RobertKoikai force-pushed the feature/support-search-with-accents branch from ccc146c to 9b3433d Compare August 23, 2023 09:05
@thenav56 thenav56 merged commit 4111bfe into develop Aug 23, 2023
@thenav56 thenav56 deleted the feature/support-search-with-accents branch August 23, 2023 09:28
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.

2 participants