1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed #27081 -- Allowed migrations to serialize methods on pypy.

This commit is contained in:
Tim Graham 2016-08-30 21:47:34 -04:00 committed by GitHub
parent 3f16e4df49
commit 96ee486ea4

View File

@ -376,7 +376,7 @@ def serializer_factory(value):
return DecimalSerializer(value)
if isinstance(value, functools.partial):
return FunctoolsPartialSerializer(value)
if isinstance(value, (types.FunctionType, types.BuiltinFunctionType)):
if isinstance(value, (types.FunctionType, types.BuiltinFunctionType, types.MethodType)):
return FunctionTypeSerializer(value)
if isinstance(value, collections.Iterable):
return IterableSerializer(value)