I have a parent child model and i want if the parent object got deleted all the children get deleted too (safe delete in my case):
class Review(SafeDeleteModel):
_safedelete_policy = SOFT_DELETE_CASCADE
parent = models.ForeignKey(
'self',
verbose_name=_("Parent"),
related_name="children",
on_delete=models.CASCADE,
null=True,
blank=True
)
and if i delete the parent object this error will be raised:
cannot unpack non-iterable NoneType object

I have a parent child model and i want if the parent object got deleted all the children get deleted too (safe delete in my case):
and if i delete the parent object this error will be raised:

cannot unpack non-iterable NoneType object