New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug where if a subscription had a trial end of none, that the… #369

Merged
merged 2 commits into from Oct 2, 2017

Conversation

Projects
None yet
2 participants
@dmcmulle

dmcmulle commented Sep 20, 2017

Update subscription code would crash on charge_immediately when trial_period was set to NULL in database (None). This would happen if there were plans with trial periods mixed with plans that do not have trial periods.

What's this PR do?

Makes sure the trial period is not 'None' before attempting a time comparison between trial_end and timezone.now()

Any background context you want to provide?

This happens when you try to 'charge_immediately' on a plan with no trial period, or no trial period plan was initially selected.

What ticket or issue # does this fix?

n/a

Closes

Definition of Done (check if considered and/or addressed):

  • Are all backwards incompatible changes documented in this PR?
  • Have all new dependencies been documented in this PR?
  • Has the appropriate documentation been updated (if applicable)?
  • Have you written tests to prove this change works (if applicable)?

Dalton McMullen and others added some commits Sep 20, 2017

Dalton McMullen
Fixed a bug where if a subscription had a trial end of none, that the…
… update subscription code would crash on charge_immediately. This would happen if there were plans with trial periods mixed with plans that do not have trial periods.

@paltman paltman merged commit 6a408dc into pinax:master Oct 2, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 100.0%
Details

@paltman paltman added this to the Samwise milestone Oct 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment