From e8252fc4451ee2c05779b28e74417174f0a2eeef Mon Sep 17 00:00:00 2001 From: Nicolò Intrieri <81313286+n-borges@users.noreply.github.com> Date: Tue, 18 Jul 2023 05:27:40 +0200 Subject: Fixed #34716 -- Fixed serialization of nested class methods in migrations. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolò --- django/db/migrations/serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py index d88cda6e20..06657ebaab 100644 --- a/django/db/migrations/serializer.py +++ b/django/db/migrations/serializer.py @@ -168,7 +168,7 @@ class FunctionTypeSerializer(BaseSerializer): ): klass = self.value.__self__ module = klass.__module__ - return "%s.%s.%s" % (module, klass.__name__, self.value.__name__), { + return "%s.%s.%s" % (module, klass.__qualname__, self.value.__name__), { "import %s" % module } # Further error checking -- cgit v1.3