#33064: Created Model is not showing in Django Atomic Trasaction Block
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
dipensompura |
Type: Bug | Status: new
Component: | Version: 3.1
Uncategorized | Keywords: transaction atomic
Severity: Normal | mysql
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Following code not working, it should increase count within the block
itself:
I am using django with mysql database.
{{{#!python
>>> len(ModelObject.objects.all())
89
>>> with transaction.atomic():
... ModelObject.objects.create(modelId="123")
... print(len(ModelObject.objects.all()))
...
<ModelObject: ModelObject object (16125)>
89
>>> len(ModelObject.objects.all())
90
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33064>
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/055.ddd51a8731d28087fe2be60dba2567d6%40djangoproject.com.