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 specifying a single string as fields #766

Open
KommuSoft opened this issue Nov 13, 2024 · 0 comments
Open

Allow specifying a single string as fields #766

KommuSoft opened this issue Nov 13, 2024 · 0 comments

Comments

@KommuSoft
Copy link

An error that probably occurs occasionally (like here) is that fields in a TranslationOptions is given a single string, not a list/tuple/... of strings.

This is a bit of a stupid mistake that we can probably prevent by just checking if the item is a string, and if that is the case wrap it in a tuple in the constructor, thus preventing the error from occurring?

Thoughts?

KommuSoft pushed a commit to hapytex/django-modeltranslation that referenced this issue Nov 13, 2024
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

No branches or pull requests

1 participant