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

fix: Handle null cancellation dates #4589

Merged
merged 5 commits into from
Sep 9, 2024

Conversation

zachaysan
Copy link
Contributor

@zachaysan zachaysan commented Sep 4, 2024

Changes

Trials mean we don't always get cancellation dates in the response from Chargebee. This fixes this.

How did you test this code?

Edit: There is now testing in place. The one path where current_term_end is set was covered by an existing test, so I've added one new one for the case where it is unset.

@zachaysan zachaysan requested a review from a team as a code owner September 4, 2024 19:21
@zachaysan zachaysan requested review from matthewelwell and removed request for a team September 4, 2024 19:21
Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2024 1:58pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2024 1:58pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Sep 6, 2024 1:58pm

Copy link

sentry-io bot commented Sep 4, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: api/organisations/chargebee/webhook_handlers.py

Function Unhandled Issue
process_subscription TypeError: 'NoneType' object cannot be interpreted as an integer /ap...
Event Count: 3

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot added api Issue related to the REST API fix labels Sep 4, 2024
Copy link
Contributor

github-actions bot commented Sep 4, 2024

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith:pr-4589 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4589 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api-test:pr-4589 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-4589 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-4589 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-4589 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-4589 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4589 Finished ✅ Results

Copy link
Contributor

github-actions bot commented Sep 4, 2024

Uffizzi Preview deployment-55888 was deleted.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.16%. Comparing base (5c02c1e) to head (2100670).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #4589    +/-   ##
========================================
  Coverage   97.15%   97.16%            
========================================
  Files        1156     1157     +1     
  Lines       39934    40039   +105     
========================================
+ Hits        38797    38902   +105     
  Misses       1137     1137            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewelwell
Copy link
Contributor

@zachaysan I'm not sure why testing is N/A here? Let's make sure that we add some test coverage please.

@github-actions github-actions bot added fix and removed fix labels Sep 5, 2024
@zachaysan
Copy link
Contributor Author

@zachaysan I'm not sure why testing is N/A here? Let's make sure that we add some test coverage please.

This is done now @matthewelwell

@github-actions github-actions bot added fix and removed fix labels Sep 5, 2024
@github-actions github-actions bot added fix and removed fix labels Sep 6, 2024
@github-actions github-actions bot added fix and removed fix labels Sep 6, 2024
@matthewelwell matthewelwell added this pull request to the merge queue Sep 9, 2024
Merged via the queue into main with commit 603889c Sep 9, 2024
35 checks passed
@matthewelwell matthewelwell deleted the fix/handle_null_cancellation_dates branch September 9, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants