#3447: Attempt to add new inline-edited item in admin interface results in
ProgrammingError ERROR: invalid input syntax for integer: "".  Used to work
in older SVN snapshot.
-----------------------+----------------------------------------------------
Reporter:  mdkemp      |       Owner:  adrian                       
  Status:  new         |   Component:  Admin interface              
 Version:  SVN         |    Keywords:  edit_inline, ProgrammingError
   Stage:  Unreviewed  |   Has_patch:  0                            
-----------------------+----------------------------------------------------
 Consider the following extremely-simple inline-edited relationship:
 
 {{{
 class Case(models.Model):
         name = models.CharField(maxlength=100)
 
         class Admin:
                 pass
 
 
 class Label(models.Model):
         case = models.ForeignKey(Case, edit_inline=models.TABULAR)
         name = models.CharField(maxlength=100, core=True)
 
         class Admin:
                 pass
 }}}
 
 In this case, if I try to add a new Label to a Case (while editing the
 Case via its admin interface view), I get the following error:
 
 {{{
 Exception Type:         ProgrammingError
 Exception Value:        ERROR: invalid input syntax for integer: "" SELECT
 1 FROM "peopledb_label" WHERE "id"='' LIMIT 1
 }}}
 
 The following were the arguments from the HTTP POST operation when I
 clicked Save:
 
 {{{
 label.0.id     ''
 name           'Case1'
 label.0.name   'TestLabel1'
 }}}
 
 It appears that when trying to determine if an old record should be
 updated rather than inserted into the database, an invalid query was
 built.  I've encountered this problem now on three different django
 projects.  This used to work in a version of django from a SVN snapshot
 around 12/15/2006, and does work if I revert my installed django to that
 version.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3447>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to