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

Problem with default value when terms comes from a source #59

Open
tdesvenain opened this issue Nov 29, 2016 · 1 comment
Open

Problem with default value when terms comes from a source #59

tdesvenain opened this issue Nov 29, 2016 · 1 comment

Comments

@tdesvenain
Copy link
Contributor

Default value is excluded because terms is empty when value is validated

@tdesvenain
Copy link
Contributor Author

An example that reproduces the issue:

@provider(IContextAwareDefaultFactory)
def test_default(context):
    return context.UID()

class IBroadcastForm(form.Schema):
    test = schema.Choice(
        title=u"test",
        defaultFactory=test_default,
        source=UUIDSourceBinder(),
    )
    form.widget(test=RadioFieldWidget)

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