team-3/src/c3nav/api/signals.py

3 lines
155 B
Python
Raw Normal View History

def remove_tokens_on_user_save(sender, instance, **kwargs):
instance.login_tokens.exclude(session_auth_hash=instance.get_session_auth_hash()).delete()