

def clean_messages(sender, **kwargs):
    '\n    If there are no more users for this message, delete it from\n    the database.\n    '
    if (kwargs['created'] == False):
        if (kwargs['instance'].users.count() == 0):
            kwargs['instance'].delete()

dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/messaging/models.py clean_messages/original