Changes between Initial Version and Version 1 of Ticket #13492


Ignore:
Timestamp:
05/07/2010 09:58:01 PM (5 years ago)
Author:
russellm
Comment:

Sounds like you've missed the section on defaults in the docs.

For future reference, if you're uncertain if you've found a bug, it's better to ask on django-users first.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13492

    • Property Status changed from new to closed
    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Needs documentation unset
    • Property Resolution changed from to invalid
  • Ticket #13492 – Description

    initial v1  
    44I have applied custom SQL for that constraint.
    55
    6 As I am bulk loading the table, I am making use of get_or_create(field0__iexact=value0, field1=value1).
     6As I am bulk loading the table, I am making use of get_or_create(field0!__iexact=value0, field1=value1).
    77When I use this invocation, field0 ends up being set as null.
    88
    9 If I invoke it as get_or_create(field0__iexact=value0, field0=value0, ...)
     9If I invoke it as get_or_create(field0!__iexact=value0, field0=value0, ...)
    1010I eventually have a constraint error.
    1111
    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.
     12I 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.
    1313
    1414I am currently avoiding the problem by catching an exception on psycopg2.IntegrityError, but that does not seem to be the right solution.
Back to Top