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

work around missing min and max length fields caused by changing #88

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pretalx/orga/forms/cfp.py
Expand Up @@ -75,14 +75,14 @@ def __init__(self, *args, obj, **kwargs):
self.fields[field_name] = forms.IntegerField(
required=False,
min_value=0,
initial=obj.cfp.fields[attribute].get("min_length"),
initial=obj.cfp.fields.get(attribute,{"min_length":None}).get("min_length"),
)
self.fields[field_name].widget.attrs["placeholder"] = ""
field_name = f"cfp_{attribute}_max_length"
self.fields[field_name] = forms.IntegerField(
required=False,
min_value=0,
initial=obj.cfp.fields[attribute].get("max_length"),
initial=obj.cfp.fields.get(attribute,{"max_length":None}).get("max_length"),
)
self.fields[field_name].widget.attrs["placeholder"] = ""
for attribute in self.request_require_fields:
Expand Down