1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Made MigrationWriter look for a "deconstruct" attribute on functions.

Refs #20978.
This commit is contained in:
Loic Bistuer
2013-09-02 13:02:07 +07:00
committed by Tim Graham
parent 5df8f749e6
commit d59f1993f1
3 changed files with 28 additions and 17 deletions

View File

@@ -35,6 +35,7 @@ def SET(value):
else:
def set_on_delete(collector, field, sub_objs, using):
collector.add_field_update(field, value, sub_objs)
set_on_delete.deconstruct = lambda: ('django.db.models.SET', (value,), {})
return set_on_delete