#2160: Can't use value of 0 for primary key
-------------------------------------------+--------------------------------
Reporter: fgutierrez AT aureal.com.pe | Owner: adrian
Status: reopened | Component: Database
wrapper
Version: SVN | Resolution:
Keywords: | Stage: Design
decision needed
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 1
-------------------------------------------+--------------------------------
Changes (by russellm):
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* stage: Ready for checkin => Design decision needed
Comment:
The approach of the 0_pk.2 patch isn't my ideal solution. The fact that
the internal logic reads as 'bool(arg) or arg == 0' should be a warning
flag; this doesn't make much sense as a logical construct, and doesn't
scan well with standard python usage of truth values.
IMHO, the better fix for this problem would be to use the 'pk is None'
logic from [4459], but modify the edit-inline code that breaks as a result
of this approach. Keep in mind that edit-inlines will be cleaned up as a
part of the newforms admin rewrite; if we can kill 2 birds with one stone,
all the better.
--
Ticket URL: <http://code.djangoproject.com/ticket/2160#comment:9>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---