﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34072	django += 1 increments by 2 instead of 1	kaushik kothiya	nobody	"from django.db.models import F
from hotel.models import Hotel

Hotel.objects.filter(city='Chicago').update(total_like=F('total_like'+1))


total_like += 1 increments by 2 instead of 1
So here is my question: What kind of locking mechanisms are available to Django, to deal with situations similar to this?

After installing the channel and HTTPS request also send wia asgi. but if the same code is in use WSGI request then working fine.

https://stackoverflow.com/questions/68778007/django-1-increments-by-2-instead-of-1
https://stackoverflow.com/questions/1030270/race-conditions-in-django"	Bug	closed	Database layer (models, ORM)	3.2	Normal	invalid	ASGI, Channel, ORM, F Expiration, Race Condition		Unreviewed	0	0	0	0	0	0
