mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 23:46:05 -03:30
Make non-polymorphic refs that slip through still work with our SET_NULL
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user