#32882: Problems when comparing two fields with None value using F() in Case()
-------------------------------------+-------------------------------------
Reporter: jntsouza | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 2.2
layer (models, ORM) | Keywords: F() Case() None !=
Severity: Normal | None
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Problems when comparing two fields in an annotate.
when = ~Q(**{ 'name' :
F('order_process__name') })
annotate = {
'has_name_divergence': Case(
When(when, then=True),
default=False,
output_field=CharField(),
),
}
When both fields have None value, the case result is true.
None != None
Using postgresSQL
--
Ticket URL: <https://code.djangoproject.com/ticket/32882>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.53c93dd54272a0032b2c4007c6861808%40djangoproject.com.