on_delete=models.CASCADE here means that if the Place object is deleted, the Person object should also be deleted. I don't think that is what we want. models.SET_NULL is more appropriate, meaning the Person object is not affected other than setting the field to NULL (null=True is necessary).
See for instance https://github.com/tsg-humlab/shewrote/blob/dde56bccbf2b4c8dc9ddc2c69b9281a521c36130/shewrote/models.py#L34
on_delete=models.CASCADE
here means that if the Place object is deleted, the Person object should also be deleted. I don't think that is what we want.models.SET_NULL
is more appropriate, meaning the Person object is not affected other than setting the field to NULL (null=True
is necessary).See also https://docs.djangoproject.com/en/4.2/ref/models/fields/#django.db.models.ForeignKey.on_delete