Hi Folks,
I'd like to update/initiate a database with an unique=True Field.
It shall be a "batch-process" (List of entries to take over into the
database.
for item in leasing:
l = Leasing(leasing = item)
try:
l.save()
except IntegrityError,e :
errors.append(e)
except:
pass
leasing.append(errors)
same with except (ProgramminError, IntegrityError), e
First IntegrityError-Exception will be catched but next not - I get an
ProgrammingError
SET client_encoding to 'UNICODE'..........
and all other entries in the list will be skiped with the same error-
message... no storing into the database even though there's no
IntegrityErros (unique elements).
consequently - I can't process the whole list.
Is this behaviour known - and is there a solution/work around.
If not - how can I "batch" the whole list and catch IntegrityErrors
It is Potgresql database
Thx
Timothy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---