500 on POST /today: @queued_property_ids nil in create turbo stream #74

Closed
opened 2026-06-04 04:19:00 +00:00 by ldraney · 0 comments
Owner

Type

Bug

Lineage

Standalone — discovered during operations (production 500 in logs).

Repo

ldraney/landscaping-assistant

What Broke

POST /today (WorkQueueItemsController#create) returns 500 when rendering the turbo stream response. The _property_item.html.erb partial calls @queued_property_ids.include?(property.id) on line 11, but @queued_property_ids is never set in the create action — only in index. Result: NoMethodError: undefined method 'include?' for nil.

ActionView::Template::Error (undefined method 'include?' for nil)
app/views/work_queue_items/_property_item.html.erb:11
app/views/work_queue_items/create.turbo_stream.erb:10

Repro Steps

  1. Go to the Today tab
  2. Click the + button to add a property to the work queue
  3. Observe: 500 error, turbo stream response fails

Expected Behavior

Property is added to the queue. The turbo stream replaces the property item partial, showing "Queued" badge instead of the + button.

Environment

  • Cluster/namespace: prod / landscaping-assistant
  • Service version/commit: current HEAD on main
  • Related alerts: none (alerting not yet wired — #17)

Acceptance Criteria

  • Bug no longer reproduces
  • Adding a property to the queue via Today tab works without error
  • No regression in related functionality (destroy, reorder)
  • landscaping-assistant — project this affects
### Type Bug ### Lineage Standalone — discovered during operations (production 500 in logs). ### Repo `ldraney/landscaping-assistant` ### What Broke `POST /today` (WorkQueueItemsController#create) returns 500 when rendering the turbo stream response. The `_property_item.html.erb` partial calls `@queued_property_ids.include?(property.id)` on line 11, but `@queued_property_ids` is never set in the `create` action — only in `index`. Result: `NoMethodError: undefined method 'include?' for nil`. ``` ActionView::Template::Error (undefined method 'include?' for nil) app/views/work_queue_items/_property_item.html.erb:11 app/views/work_queue_items/create.turbo_stream.erb:10 ``` ### Repro Steps 1. Go to the Today tab 2. Click the + button to add a property to the work queue 3. Observe: 500 error, turbo stream response fails ### Expected Behavior Property is added to the queue. The turbo stream replaces the property item partial, showing "Queued" badge instead of the + button. ### Environment - Cluster/namespace: prod / landscaping-assistant - Service version/commit: current HEAD on main - Related alerts: none (alerting not yet wired — #17) ### Acceptance Criteria - [ ] Bug no longer reproduces - [ ] Adding a property to the queue via Today tab works without error - [ ] No regression in related functionality (destroy, reorder) ### Related - `landscaping-assistant` — project this affects
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/landscaping-assistant#74
No description provided.