#4499: integrity error silently failing
------------------------------------------------+---------------------------
   Reporter:  [EMAIL PROTECTED]                   |                Owner:  
adrian          
     Status:  reopened                          |            Component:  
Database wrapper
    Version:  SVN                               |           Resolution:         
         
   Keywords:  save integrity  operationalError  |                Stage:  
Unreviewed      
  Has_patch:  0                                 |           Needs_docs:  0      
         
Needs_tests:  0                                 |   Needs_better_patch:  0      
         
------------------------------------------------+---------------------------
Comment (by [EMAIL PROTECTED]):

 Replying to [ticket:4499 [EMAIL PROTECTED]:
 >
 >
 > this is a simple example where a Model.save() that should raise
 > integrity/operational errors is not:
 
 I got the same problem loading a fixture using "manage.py loaddata
 test_ticket.json".
 
 This is the Django reply:
 {{{
 Loading 'test_ticket' fixtures...
 Installing json fixture 'test_ticket' from '/usr/lib/python2.4/site-
 packages/jungle/apps/ticket/fixtures'.
 Installed 1 object(s) from 1 fixture(s)
 }}}
 
 ...and this is the Postgresql log:
 {{{
 2007-06-19 15:08:47 CEST ERROR:  insert or update on table
 "ticket_project_organization" violates foreign key constraint
 "ticket_project_organization_organization_id_fkey"
 2007-06-19 15:08:47 CEST DETAIL:  Key (organization_id)=(1) is not present
 in table "organization_organization".
 2007-06-19 15:08:47 CEST STATEMENT:  END
 2007-06-19 15:08:47 CEST WARNING:  non c'รจ nessuna transazione in corso
 2007-06-19 15:08:47 CEST LOG:  duration: 0.579 ms  statement: ABORT
 }}}
 
 This happened because I forgot to load the fixture needed by the one I
 executed and, of course, the db table is empty.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4499#comment:4>
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