mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Make non-polymorphic refs that slip through still work with our SET_NULL
This commit is contained in:
parent
d0d9266dd1
commit
b0c511a7a2
@ -15,4 +15,6 @@ def build_polymorphic_ctypes_map(cls):
|
||||
|
||||
|
||||
def SET_NULL(collector, field, sub_objs, using):
|
||||
return models.SET_NULL(collector, field, sub_objs.non_polymorphic(), using)
|
||||
if hasattr(sub_objs, 'non_polymorphic'):
|
||||
sub_objs = sub_objs.non_polymorphic()
|
||||
return models.SET_NULL(collector, field, sub_objs, using)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user