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

Force default to None if the list of allowed languages is empty #620

Merged
merged 2 commits into from
Sep 22, 2021

Conversation

drnlm
Copy link
Member

@drnlm drnlm commented Sep 22, 2021

If the language list in settings is left at the default in the settings file, the default value in the database is set to '()', while the list of legal choices is empty. This results in the individual talk admin form being somewhat annoying to use, - unless the language field is explicitly deleted, the admin form will error out with "Select a valid choice. () is not one of the available choices." when a change is made.

This change sets the default to None in this case, which is more appropriate behaviour.

We could also change the default for WAFER_TALK_LANGUAGES to be None in the settings file, but there is value in keeping the hint that this should be a tuple there.

wafer/talks/models.py Outdated Show resolved Hide resolved
@terceiro
Copy link
Contributor

LGTM

@drnlm drnlm merged commit 9d3d0f7 into master Sep 22, 2021
@drnlm drnlm deleted the bugfix/handle_no_language_in_admin_form branch October 6, 2021 11:24
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