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

The countries filed contains empty string not None #27

Closed
SmileyChris opened this issue Jun 22, 2013 · 3 comments
Closed

The countries filed contains empty string not None #27

SmileyChris opened this issue Jun 22, 2013 · 3 comments

Comments

@SmileyChris
Copy link
Owner

My field is declared as:
country = CountryField(blank=True, null=True)

But when I save the field without setting value of settings None it saves it as empty string. As result when I use obj.country in template it raises an exception.
Anyone else having the same issue?


@SmileyChris
Copy link
Owner Author


body: ! 'Sorry it is my fault and the code is working perfectly. All this was caused
by cached object.

Sorry once again for disturbing and thanks for the app )'
created_at: '2013-01-15 23:36:37+00:00'
user: ! 'ilian'
number: 2851522

@SmileyChris
Copy link
Owner Author


body: ! 'A deeper investigation shows that the reason for the crash is caused by the
following line(fields.py:100):

setattr(cls, self.name, self.descriptor_class(self))

Unfortunately I not quite understand how this work but I''ll try to read more and
maybe even fix it )))'
created_at: '2013-01-15 22:55:51+00:00'
user: ! 'ilian'
number: 2851247

@SmileyChris
Copy link
Owner Author

Don't think this is an issue

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