﻿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
29751	Saving deserialized objects in custom migration fails in certain cases	Kedar	Kedar	"Saving deserialised objects in custom migration fails in certain cases (model has new fields added since) because `_get_model` used [[https://github.com/django/django/blob/b9cf764be62e77b4777b3a75ec256f6209a57671/django/core/serializers/python.py#L91|here]] uses the latest version of the model (rather than the migration-specific model, which is derived using `apps.get_model` where `apps` is the first argument passed to a custom migration function - which is passed to `migrations.RunPython`)

Fix here would be to pass the `apps` received as first argument in a custom migration via the `**options` in `deserialize()`"	Bug	closed	Migrations	1.11	Normal	duplicate	serialize,deserialize,migration		Unreviewed	0	0	0	0	0	0
