Beispiel #1
0
def handle_emails_pre_case_delete(sender, instance, **_kwags):
    """
        Send email updates before a TestCase will be deleted!
    """
    if instance.emailing.notify_on_case_delete:
        from tcms.testcases.helpers import email
        email.email_case_deletion(instance)
Beispiel #2
0
def handle_emails_pre_case_delete(sender, **kwargs):
    """
        Send email updates before a TestCase will be deleted!
    """
    instance = kwargs['instance']

    try:
        # note: using the `email_settings` related object instead of the
        # `emailing` property b/c it breaks with cascading deletes via admin.
        # if there are not settings created before hand they default to False
        # so email will not going to be sent and the exception is safe to ignore
        if instance.email_settings.notify_on_case_delete:
            from tcms.testcases.helpers import email
            email.email_case_deletion(instance)
    except ObjectDoesNotExist:
        pass
Beispiel #3
0
def on_case_delete(sender, instance, **kwags):
    # case delete and email
    if instance.emailing.notify_on_case_delete:
        email.email_case_deletion(instance)
Beispiel #4
0
def on_case_delete(sender, instance, **kwags):
    # case delete and email
    if instance.emailing.notify_on_case_delete:
        email.email_case_deletion(instance)