def _handle_business_contact(business, org, contact_data):
    from contacts.models import Contact, CONTACT_TYPES
    if not contact_data:
        return business

    contact_data = copy.deepcopy(contact_data)
    pk = contact_data.pop('id', None)
    contact_data = copy.deepcopy(contact_data)
    contact_data['contact_type'] = convert_choice_data(
        contact_data.get('contact_type'),
        CONTACT_TYPES
    )
    contact_data['super_organization_id'] = org.pk
    contact = None

    if pk:
        contact = Contact.objects.get(pk=pk)
    elif contact_data:
        contact = Contact.objects.create(**contact_data)

    if contact:
        contact.super_organization = org
        contact.save()
        business.owner = contact
        business.save()

    return business
Called when a lease expires.
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/models.py/_handle_business_contact--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/cmd/dhcpbridge.py/del_lease