Skip to content

fix(streak): remove unnecessary order_by clauses in streak calculations

Mukthanand Reddy M requested to merge fix/streaks into develop

Bug Report Template

Title (semantic)

fix(streak): prevent zero streaks from failed distinct date queries

Description

This merge request fixes a backend streak calculation issue by removing unnecessary ORDER BY clauses from distinct contribution and edit streak date queries.

These queries could fail in PostgreSQL when combined with DISTINCT, causing the profile streak API to fall back to zero streak values. The change helps ensure streak data is calculated correctly and returned to the frontend.

Checklist

  • The bug has been reproduced and confirmed.
  • A clear and concise fix has been implemented.
  • New tests have been added to prevent regressions.
  • Existing tests are passing.

Related Issue(s)

Closes #

Merge request reports

Loading