Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #20978 -- Made deletion.SET_NULL more friendly for MigrationWri…

…ter.serialize.
  • Loading branch information...
commit 5df8f749e6338c85a091f41803e6ecb280fc9f70 1 parent 0ac7cc3
Loïc Bistuer loic authored timgraham committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/db/models/deletion.py
3  django/db/models/deletion.py
View
@@ -38,7 +38,8 @@ def set_on_delete(collector, field, sub_objs, using):
return set_on_delete
-SET_NULL = SET(None)
+def SET_NULL(collector, field, sub_objs, using):
+ collector.add_field_update(field, None, sub_objs)
def SET_DEFAULT(collector, field, sub_objs, using):
Please sign in to comment.
Something went wrong with that request. Please try again.