﻿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
23386	Clear F expressions after a model instance is saved	codefisher	nobody	"I would have thought these two expresses would be exactly the same, except the second would be more efficient.

A: some_model.some_field += 1
B: some_model.some_field = F('some_field') + 1

I hit some unexpected behaviour when, I did this

some_model.save()
# and somewhere far far away
some_model.save()

With A, the field is incremented once, as I expected.  But with B, it gets incremented twice.  I would have expected the F query to effect the next database call, and nothing more.  It might be intended, but then it is not documented.

I could write some come to demonstrate this.  I only noticed it because I was using an import script that was creating lots of objects, and I had A and B in the model's overridden save method. They were causing vastly different results."	Cleanup/optimization	closed	Database layer (models, ORM)	1.6	Normal	duplicate			Accepted	0	0	0	0	0	0
