mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #26475 -- Added functools.partial() support to migrations autodetector.
This commit is contained in:
committed by
Tim Graham
parent
2a9bcb503f
commit
5402f3ab09
@@ -1,6 +1,7 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
import functools
|
||||
import re
|
||||
from itertools import chain
|
||||
|
||||
@@ -63,6 +64,8 @@ class MigrationAutodetector(object):
|
||||
key: self.deep_deconstruct(value)
|
||||
for key, value in obj.items()
|
||||
}
|
||||
elif isinstance(obj, functools.partial):
|
||||
return (obj.func, self.deep_deconstruct(obj.args), self.deep_deconstruct(obj.keywords))
|
||||
elif isinstance(obj, COMPILED_REGEX_TYPE):
|
||||
return RegexObject(obj)
|
||||
elif isinstance(obj, type):
|
||||
|
||||
Reference in New Issue
Block a user