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

invalid literal for int() with base 10: '' #2

Closed
taxido opened this issue Jun 13, 2012 · 3 comments
Closed

invalid literal for int() with base 10: '' #2

taxido opened this issue Jun 13, 2012 · 3 comments
Assignees

Comments

@taxido
Copy link

taxido commented Jun 13, 2012

Jeżeli w formie (ChoiceField) nie wybierzemy wartości (--------------------------------------) błąd zwraca nie formularz w walidacji a django

invalid literal for int() with base 10: ''
@ambv
Copy link
Owner

ambv commented Jun 13, 2012

OK, do poprawienia. Dzięki za zgłoszenie.

@ghost ghost assigned ambv Jun 13, 2012
@taxido
Copy link
Author

taxido commented Jun 13, 2012

Sądze że to też będzie powiązane,bo w sumie chodzi o to samo o walidacje:
Wartości spoza listy Choices (spreparowanie POST) również zwraca błąd:

[u"'%s' value must be an integer."]

Powyższe problemy nie występują dla djangowego

models.IntegerField(choices=zip(range(1,100), range(1,100))) 

nie powodują błędu django. Prawidłowo zwraca błąd w walidacji

Select a valid choice. bhjghbnhjg is not one of the available choices.

A dla wcześniejszego błędu:

This field is required.

@ambv ambv closed this as completed in c2beb13 Jun 18, 2012
@ambv
Copy link
Owner

ambv commented Jun 18, 2012

0.8.6 released that contains this fix.

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

2 participants