subscriptions are really only intended for non-default plans, because we
want to change what the default plan is across the board...again I think we
need to go to voice on this.


On Tue, Jan 21, 2014 at 1:53 PM, Cory Zue <notifications@github.com> wrote:

> In corehq/apps/accounting/invoicing.py:
>
> > +        subscription = Subscription(
> > +            account=self.account,
> > +            subscriber=subscriber,
> > +            plan=self.software_plan,
> > +            date_start=self.date_start,
> > +            date_end=self.date_end,
> > +        )
> > +        subscription.save()
> > +        return subscription
> > +
> > +    def create(self):
> > +        invoice = super(CommunityInvoiceFactory, self).create()
> > +        if invoice is None:
> > +            # no charges were created, so delete the temporary subscription to the community plan for this
> > +            # invoicing period
> > +            self.subscription.delete()
>
> if i'm reading this right this code could create and then immediately
> delete a subscription, right? isn't that... not ideal?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dimagi/commcare-hq/pull/2275/files#r9048968>
> .
>