expephalon-smsotp/core/receivers/profiles.py
Klaus-Uwe Mitterer 53780751d1 Preparing files for admin profiles
Changing File models to allow user association
2020-04-16 15:22:03 +02:00

7 lines
No EOL
219 B
Python

from django.db.models.signals import post_delete
from core.models.profiles import AdminProfile
@receiver(post_delete, sender=AdminProfile)
def delete_user(sender, instance, *args, **kwargs):
instance.user.delete()