Changes between Initial Version and Version 1 of Ticket #13492
- 05/07/2010 09:58:01 PM (7 years ago)
- Property Status changed from
initial v1 4 4 I have applied custom SQL for that constraint. 5 5 6 As I am bulk loading the table, I am making use of get_or_create(field0 __iexact=value0, field1=value1). 6 As I am bulk loading the table, I am making use of get_or_create(field0__iexact=value0, field1=value1). 7 7 When I use this invocation, field0 ends up being set as null. 8 8 9 If I invoke it as get_or_create(field0 __iexact=value0, field0=value0, ...) 9 If I invoke it as get_or_create(field0__iexact=value0, field0=value0, ...) 10 10 I eventually have a constraint error. 11 11 12 I would expect a FieldError if field0 __iexact were not permitted, and I would expect the fieldname to be calculated from field0__iexact if it were permitted. 12 I would expect a FieldError if field0__iexact if it were permitted. 13 13 14 14 I am currently avoiding the problem by catching an exception on psycopg2.IntegrityError, but that does not seem to be the right solution.