Skip to content

Stop writting PollStats rows#1324

Merged
norkans7 merged 1 commit intomainfrom
new-stats-7
Dec 11, 2025
Merged

Stop writting PollStats rows#1324
norkans7 merged 1 commit intomainfrom
new-stats-7

Conversation

@norkans7
Copy link
Copy Markdown
Contributor

@norkans7 norkans7 commented Dec 8, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 8, 2025 15:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes code that writes to the PollStats model as part of migrating to the newer PollStatsCounter model for tracking poll statistics. The changes are focused on removing write operations while preserving the existing PollStatsCounter functionality.

Key Changes:

  • Removed PollStats object creation and bulk insertion from poll results counting logic
  • Removed PollStats deletion logic from the delete_poll_stats method
  • Removed the unused get_question_stats classmethod from the PollStats model
  • Updated test assertions to remove PollStats checks while keeping PollStatsCounter checks

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
ureport/stats/models.py Removed the unused get_question_stats classmethod that filtered PollStats objects
ureport/polls/models.py Removed PollStats import, object creation, bulk insert, and deletion logic from poll statistics methods
ureport/polls/tests.py Removed PollStats assertions from test_delete_poll_stats and test_poll_results_stats while preserving PollStatsCounter test coverage
ureport/public/tests.py Removed extraneous blank line for code cleanup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.82%. Comparing base (3059370) to head (1c945fb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1324      +/-   ##
==========================================
+ Coverage   83.79%   83.82%   +0.02%     
==========================================
  Files          49       49              
  Lines        6066     6051      -15     
==========================================
- Hits         5083     5072      -11     
+ Misses        983      979       -4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@norkans7 norkans7 merged commit b74d633 into main Dec 11, 2025
8 checks passed
@norkans7 norkans7 deleted the new-stats-7 branch December 17, 2025 13:57
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.

3 participants