#5763: Queryset doesn't have a "not equal" filter operator
-------------------------------------+-------------------------------------
Reporter: jdetaeye | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: qs-rf | Triage Stage: Design
| decision needed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by cpbotha):
Is there a way to work around the absence of the `ne` operator when one
wants to do a `get_or_create()` or an `update_or_create()` where one wants
to select records with a non-blank text field value?
In other words, how would I do for example
`Blog.objects.update_or_create(text_contents__ne='',
other_field_indicating_sort=42, defaults={yet_another_field: True})` ?
--
Ticket URL: <https://code.djangoproject.com/ticket/5763#comment:25>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.a94785679ff30b28862ac53c170813aa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.