'add domain in active domain'

def add_active_domain(self, domain):

    if (not domain):
        return
    domain_settings = frappe.get_doc(u'Domain    Settings', u'Domain    Settings')
    domain_settings.append(u'active_domains', {u'domain': domain})
    domain_settings.save()
