fix(filters): update to flavortowns actual enddate...#1150
fix(filters): update to flavortowns actual enddate...#1150Lazylllama wants to merge 2 commits intohackclub:mainfrom
Conversation
Greptile SummaryThis PR updates the
Confidence Score: 4/5Not safe to merge — the invalid date will raise ArgumentError at runtime whenever the Flavortown filter is used. A single P0 bug is present: April 31 is not a valid date and Time.parse will raise ArgumentError, breaking the Flavortown filter entirely. The fix is a trivial one-character change (31 → 30). app/models/concerns/time_range_filterable.rb — line 43 has the invalid date.
|
| Filename | Overview |
|---|---|
| app/models/concerns/time_range_filterable.rb | Updates Flavortown end date from 2026-03-31 to 2026-04-31, but April has only 30 days — Time.parse will raise ArgumentError at runtime. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[filter_by_time_range called with flavortown] --> B[calculate lambda invoked]
B --> C["Time.parse date string"]
C -->|Invalid: April has 30 days| D[ArgumentError raised]
C -->|Fix: use 2026-04-30| E[Valid date range returned]
E --> F[where scope applied correctly]
Prompt To Fix All With AI
This is a comment left during a code review.
Path: app/models/concerns/time_range_filterable.rb
Line: 43
Comment:
**Invalid date: April has only 30 days**
`Time.parse("2026-04-31")` will raise an `ArgumentError` at runtime because April 31 does not exist. This will crash every call to the `flavortown` scope and the `filter_by_time_range` helper whenever `:flavortown` is selected. The end date should be `2026-04-30`.
```suggestion
to = Time.parse("2026-04-30").end_of_day
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(filters): update to flavortowns actu..." | Re-trigger Greptile
april 31st doesnt exist, Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
issue: https://hackclub.slack.com/archives/C09MATKQM8C/p1775692984686839