mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-29 20:23:36 -05:00
* It's problematic to delete an instance that is referenced by a foreign key; where the referening model is one that has a Polymorphic parent. * Specifically, when Django goes to nullify the relationship it relies on the related instances[0] class type to issue a query to decide what to nullify. So if the foreignkey references multiple different types (i.e. ProjectUpdate, Job) then only 1 of those class types will get nullified. The end result is an IntegrityError when delete() is called. * This changeset ensures that the parent Polymorphic class is queried so that all the foreignkey entries are nullified * Also remove old Django "hack" that doesn't work with Django 1.11