I am trying to copy an object that extends another object through multi table inheritance.
The parent is Group and the child is Location
The problem is that the parent object is changed instead of creating a new parent and child object.
Here is what I am doing:
location = get_object_or_404(Location, pk=pk)
location.pk = None
location.name = location.name+' - child object'
location.save()
Instead of creating a new location and group row in their respective tables, this updates the group table to have the name = name + ' - child object'.
how can I have this process create a new location and group row instead of updating the Group row?
Thanks!