Skip to content

Commit

Permalink
Fix: crashing sort by on neighbourhoods (#348)
Browse files Browse the repository at this point in the history
* Fix: crashing sort by on neighbourhoods

* Remove unnecessary case.
  • Loading branch information
teesloane authored Apr 28, 2024
1 parent a04f6e5 commit 3a7a5be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bike_brigade_web/live/campaign_signup_live/show.ex
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ defmodule BikeBrigadeWeb.CampaignSignupLive.Show do

defp assign_campaign(socket, campaign) do
{riders, tasks} = Delivery.campaign_riders_and_tasks(campaign)
tasks = Enum.sort_by(tasks, fn t -> t.dropoff_location.neighborhood.name end)
tasks = Enum.sort_by(tasks, fn t -> Locations.neighborhood(t.dropoff_location) end)

socket
|> assign(:campaign, campaign)
Expand Down

0 comments on commit 3a7a5be

Please sign in to comment.