#34715: have proposal to create new orm method get_object_or_none same as
get_object_or_404
-------------------------------------+-------------------------------------
Reporter: mahavir2506 | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: django orm | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by mahavir2506:
Old description:
> want to contribute new method get_object_or_none
> As django developer many developers are facing this issue some time they
> want object and they also want if object doesn't exist tin that case
> default they will get None object
> because puting every time try except for this is very irritating so i
> want to propose this function
New description:
I want to contribute new method get_object_or_none
this method will be return object if object exist other wise this method
will return None
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34715#comment:1>
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/010701895dca790b-a47d75b3-a237-4caa-b1c5-8a0e3a7e779d-000000%40eu-central-1.amazonses.com.