Exemplo n.º 1
0
def on_pre_delete(**kwargs):
    """ Delete cleanup """
    instance = kwargs['instance']

    # Update base user class's groups
    if instance.hackathon == Hackathon.objects.current():
        acl.remove_user_from_groups(instance.user, [acl.group_hacker, acl.group_pending_hacker])

    # Delete stored resume file
    if len(instance.resume_file_name) > 0:
        files.delete_if_exists(instance.resume_file_name)
Exemplo n.º 2
0
def on_pre_delete(**kwargs):
    """ Update base user class's groups """
    instance = kwargs['instance']
    if instance.hackathon == Hackathon.objects.current():
        acl.remove_user_from_groups(instance.user, [acl.group_mentor, acl.group_pending_mentor])