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 Laundry Snapshot Collection #225

Merged
merged 6 commits into from
Nov 7, 2023
Merged

Conversation

tuneerroy
Copy link
Contributor

  • Fixes off-by-1 error when accumulating snapshot data
  • Refactors some shoddily written code

new_start = start - datetime.timedelta(weeks=week)
new_end = new_start + datetime.timedelta(hours=27)
filter |= Q(date__gt=new_start, date__lt=new_end)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the lt instead of the lte should avoid the off by one

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (de53021) 89.81% compared to head (2803d2a) 89.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
- Coverage   89.81%   89.80%   -0.02%     
==========================================
  Files          53       53              
  Lines        2259     2255       -4     
==========================================
- Hits         2029     2025       -4     
  Misses        230      230              
Files Coverage Δ
backend/laundry/views.py 90.42% <100.00%> (-0.40%) ⬇️

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

@tuneerroy tuneerroy merged commit 4ae2611 into master Nov 7, 2023
9 checks passed
@tuneerroy tuneerroy deleted the fix-laundry-snapshot-query branch November 7, 2023 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants