Closed Aircoookie closed 8 months ago
Noticed that too. I forgot to check the sender. Fixed it with:
@receiver(models.signals.post_delete)
def auto_delete_file_on_delete(sender: models.Model, instance: IssuingCa, **kwargs: Any) -> None:
if sender == IssuingCa:
<do something>
This method should only fire on deletion of an
IssuingCa
model, however it appears to be called if any model object is deleted and raises e.g.Also affects admin login/logout, as that deletes a
Session
.Workaround (ideally this method would not be called at all)