diff --git a/pinax/stripe/actions/subscriptions.py b/pinax/stripe/actions/subscriptions.py index 47da124fe..16b9b4786 100644 --- a/pinax/stripe/actions/subscriptions.py +++ b/pinax/stripe/actions/subscriptions.py @@ -167,11 +167,11 @@ def sync_subscription_from_stripe_data(customer, subscription): stripe_id=subscription["id"], defaults=defaults ) + sub = utils.update_with_defaults(sub, defaults, created) if subscription.get("discount", None): - start = subscription["discount"]["start"] - end = subscription["discount"]["end"] + start = utils.convert_tstamp(subscription["discount"]["start"]) + end = utils.convert_tstamp(subscription["discount"]["end"]) if subscription["discount"]["end"] else None models.Discount.objects.get_or_create(subscription=sub, start=start, end=end) - sub = utils.update_with_defaults(sub, defaults, created) return sub