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: Set billing term starts at 30 days for null values #4053

Merged
merged 1 commit into from
May 30, 2024

Conversation

zachaysan
Copy link
Contributor

@zachaysan zachaysan commented May 29, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Set billing term starts at 30 days for null values of the billing starting at date. Since this function is used to show API usage and isn't involved with calculating billing amounts, it's ok to default to a rolling thirty day period for API usage reporting. Solves this Sentry error.

How did you test this code?

N/A

Copy link

vercel bot commented May 29, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 7:25pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 7:25pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 7:25pm

Copy link

sentry-io bot commented May 29, 2024

🔍 Existing Issues For Review

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

📄 File: api/app_analytics/analytics_db_service.py

Function Unhandled Issue
get_usage_data TypeError: unsupported operand type(s) for +: 'relativedelta' and 'NoneType' /api/v1/organisations/{...
Event Count: 5

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

Copy link
Contributor

github-actions bot commented May 29, 2024

Uffizzi Preview deployment-52408 was deleted.

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.42%. Comparing base (9e2ffd2) to head (fb7d580).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4053   +/-   ##
=======================================
  Coverage   96.42%   96.42%           
=======================================
  Files        1146     1146           
  Lines       37386    37386           
=======================================
  Hits        36048    36048           
  Misses       1338     1338           

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

@matthewelwell matthewelwell added this pull request to the merge queue May 30, 2024
Merged via the queue into main with commit 84c0835 May 30, 2024
24 checks passed
@matthewelwell matthewelwell deleted the fix/set_billing_term_starts_at_30d_default branch May 30, 2024 08:52
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants