mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
Refs #24215 -- Fixed Python 3.5 compatiblity for unhandled lazy ops error.
This commit is contained in:
@@ -381,6 +381,10 @@ class Apps(object):
|
||||
|
||||
def function(model):
|
||||
next_function = partial(supplied_fn, model)
|
||||
# Annotate the function with its field for retrieval in
|
||||
# migrations.state.StateApps.
|
||||
if getattr(supplied_fn, 'keywords', None):
|
||||
next_function.field = supplied_fn.keywords.get('field')
|
||||
self.lazy_model_operation(next_function, *more_models)
|
||||
|
||||
# If the model is already loaded, pass it to the function immediately.
|
||||
|
||||
Reference in New Issue
Block a user