Skip to content
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

Bugfix-billing-dates #450

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Bugfix-billing-dates #450

merged 3 commits into from
Apr 24, 2024

Conversation

rhimmelbauer
Copy link
Collaborator

Notes:

  • Added validations on the Subscriptions model for fetching get_last_payment_date and get_next_billing_date
  • On the Profile model added a filter to remove any dates that are value None so that the sort won't through an exeption.

if not next_billing_dates:
return None

filtered_dates = [date for date in next_billing_dates if date is not None]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the return case come after calculating filtered_dates? what if next_billing_dates == [None]?

if not filtered_dates:
    return None

if not last_payment_dates:
return None

filtered_dates = [date for date in last_payment_dates if date is not None]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same note here

@rhimmelbauer rhimmelbauer merged commit b76714c into develop Apr 24, 2024
1 check passed
@rhimmelbauer rhimmelbauer deleted the bugfix-billing-dates branch April 24, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants