﻿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
36855	Field.pre_save() called twice during save() in Django 6.0 when inserting new records	Nino Walker	Kundan Yadav	"Commit 94680437 introduced a change where Field.pre_save() can be called twice during Model.save() for new records:

Diff: https://github.com/django/django/commit/94680437a45a71c70ca8bd2e68b72aa1e2eff337
Full method: https://github.com/django/django/blob/94680437a45a71c70ca8bd2e68b72aa1e2eff337/django/db/models/base.py#L1085-L1164

Previously, pre_save() was only called once in the values comprehension.

Impact:

This is a breaking change for custom model fields that:
  - Have side effects in pre_save() (e.g., registering transaction.on_commit callbacks)
  - Transform the value in a way that's not idempotent
  - Maintain internal state based on pre_save() being called once per save

Example:

  A custom field that registers an on_commit callback in pre_save() will now register it twice, causing the callback to execute twice.

Expected behavior:

  Field.pre_save() should be called exactly once per Model.save() operation, regardless of whether the save results in an INSERT or UPDATE.
"	Bug	closed	Documentation	6.0	Release blocker	fixed	pre_save	Nino Walker Simon Charette	Ready for checkin	1	0	0	0	0	0
