#32108: Allowing null values while registering function on transaction on_commit
-------------------------------------+-------------------------------------
Reporter: S2606 | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 2.2
layer (models, ORM) | Keywords: DjangoORM
Severity: Normal | Transaction
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
So if I were to try this command:-
`transaction.on_commit(None)`
and run any sample tests which has simple django db post_save signal in
the flow and it has functions which run on transaction commit, the code
would crash with error
`TypeError: 'NoneType' object is not callable`.
So how about if we do not allow it to register as none beforehand or allow
it to exit gracefully?
--
Ticket URL: <https://code.djangoproject.com/ticket/32108>
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/048.8e572cc34ac3d45f4325f760717c5926%40djangoproject.com.