def save_or_update_premium_template(campaign, template_design, template_type):
    """Save or Update binding between premium email and landing with campaign"""
    if template_type == 'email':
        camp_temp_design = campaign.campaigntemplatedesign_set.filter(
            template_type=template_type).first()
    else:
        camp_temp_design = template_design.campaigntemplatedesign_set.filter(
            template_type=template_type).first()
    if camp_temp_design:
        camp_temp_design.template = template_design
        camp_temp_design.campaign = campaign
    else:
        from ccc.template_design.models import CampaignTemplateDesign
        camp_temp_design = CampaignTemplateDesign(template=template_design,
            campaign=campaign, template_type=template_type)
    camp_temp_design.save()
