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

test for translated field; meta programming #1365

Merged
merged 1 commit into from
Jul 7, 2023
Merged

Conversation

longhotsummer
Copy link
Contributor

  • define prepare_... methods dynamically
  • prepare method checks for existing of attribute before calling it, because different sites may have different languages configured

court_sw = fields.KeywordField(attr="court.name_sw")
court_fr = fields.KeywordField(attr="court.name_fr")
court_pt = fields.KeywordField(attr="court.name_pt")
court_en = fields.KeywordField()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we use prepare_... I don't think the attr does anything.

Copy link
Contributor

@actlikewill actlikewill left a comment

Choose a reason for hiding this comment

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

Works okay.

@longhotsummer longhotsummer merged commit 79f1ca2 into main Jul 7, 2023
9 checks passed
@longhotsummer longhotsummer deleted the search-fix branch July 7, 2023 13:43
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