[Django] #36888: acreate method doesn't call asave

0 views
Skip to first unread message

Django

unread,
Jan 27, 2026, 2:42:19 PM (2 days ago) Jan 27
to django-...@googlegroups.com
#36888: acreate method doesn't call asave
-------------------------------------+-------------------------------------
Reporter: Materson | Owner: @…
Type: Bug | Status: assigned
Component: Database | Version: 6.0
layer (models, ORM) |
Severity: Normal | Keywords: acreate asave
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
acreate doesn't call asave method.

When you use async Django methods and you want to add custom logic in
asave method, when you create your object with acreate, it doesn't call
your asave method.

{{{
class SimpleModel(models.Model):
field = models.IntegerField()

async def asave(self, *args, **kwargs):
self.field += 1
await super().asave(*args, **kwargs)

obj = await SimpleModel.objects.acreate(field=4)
obj.field # returns 4, should be 5
}}}
When you run create, it calls save().
--
Ticket URL: <https://code.djangoproject.com/ticket/36888>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 27, 2026, 3:06:16 PM (2 days ago) Jan 27
to django-...@googlegroups.com
#36888: acreate method doesn't call asave
-------------------------------------+-------------------------------------
Reporter: Mateusz Szymanowski | Owner: @…
Type: Bug | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: acreate asave | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mateusz Szymanowski):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36888#comment:1>

Django

unread,
Jan 28, 2026, 9:33:30 AM (2 days ago) Jan 28
to django-...@googlegroups.com
#36888: acreate method doesn't call asave
-------------------------------------+-------------------------------------
Reporter: Mateusz Szymanowski | Owner: @…
Type: Bug | Status: assigned
Component: Database layer | Version: 6.0
(models, ORM) |
Severity: Normal | Resolution:
Keywords: acreate asave async | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* easy: 1 => 0
* keywords: acreate asave => acreate asave async
* stage: Unreviewed => Accepted

Comment:

Thank you Mateusz for your report! Great catch.
--
Ticket URL: <https://code.djangoproject.com/ticket/36888#comment:2>
Reply all
Reply to author
Forward
0 new messages