Skip to content

Commit 8b961ea

Browse files
committed
fixing sonarcloud issues
1 parent 2799811 commit 8b961ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

backend/tests/apps/owasp/management/commands/owasp_aggregate_contributions_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def filter(self, **kwargs):
2929
# Return self to support filter chaining
3030
return self
3131

32-
def order_by(self, *fields):
32+
def order_by(self, *_fields):
3333
"""Mock order_by method."""
3434
return self
3535

frontend/src/components/ContributionHeatmap.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ const generateHeatmapSeries = (
4040

4141
// Handle invalid range by swapping dates
4242
if (start > end) {
43-
return generateHeatmapSeries(endDate, startDate, contributionData)
43+
// Swap the date strings to ensure startDate comes before endDate
44+
const swappedStartDate = endDate
45+
const swappedEndDate = startDate
46+
return generateHeatmapSeries(swappedStartDate, swappedEndDate, contributionData)
4447
}
4548

4649
const dayNames = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']

0 commit comments

Comments
 (0)