Changes between Initial Version and Version 1 of Ticket #16767, comment 2
- Timestamp:
- Sep 8, 2011, 6:27:11 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16767, comment 2
initial v1 1 I can see the bug here - the get_or_create will create a user with id = ''. That seems confusing. The reason is probably the treatment of None as empty string (not that I have actually verified this is the case).1 I can see the bug here - the get_or_create will create a user with id = `''`. That seems confusing. The reason is probably the treatment of None as empty string (not that I have actually verified this is the case). 2 2 3 The same problem is with .save(), User(email='foobar@foo.net').save() will save a user with id = ''.3 The same problem is with .save(), User(email='foobar@foo.net').save() will save a user with id = `''`. 4 4 5 In effect `CharField` has a default value of '', and I guess that for primary keys that is not the wanted behavior.5 In effect `CharField` has a default value of `''`, and I guess that for primary keys that is not the wanted behavior.