(self, *args, **kwargs)
Overloaded to update domain pillow with subscription information
Overloaded to update domain pillow with subscription information
Overloaded to update domain pillow with subscription information
def save(self, *args, **kwargs):
        """
        Overloaded to update domain pillow with subscription information
        """
        from corehq.apps.accounting.mixins import get_overdue_invoice

        super(Subscription, self).save(*args, **kwargs)
        Subscription._get_active_subscription_by_domain.clear(Subscription, self.subscriber.domain)
        get_overdue_invoice.clear(self.subscriber.domain)

        domain = Domain.get_by_name(self.subscriber.domain)
        # If a subscriber doesn't have a valid domain associated with it
        # we don't care the pillow won't be updated
        if domain:
            publish_domain_saved(domain)
def save ( self , * args , * * kwargs ) : from corehq . apps . accounting . mixins import get_overdue_invoice super ( Subscription , self ) . save ( * args , * * kwargs ) Subscription . _get_active_subscription_by_domain . clear ( Subscription , self . subscriber . domain ) get_overdue_invoice . clear ( self . subscriber . domain ) domain = Domain . get_by_name ( self . subscriber . domain ) # If a subscriber doesn't have a valid domain associated with it # we don't care the pillow won't be updated if domain : publish_domain_saved ( domain )