Skip to content
This repository has been archived by the owner on Jun 16, 2024. It is now read-only.

Commit

Permalink
control/venue_announcements: fix TypeError when editing
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed May 2, 2023
1 parent 8b17bfc commit 1324304
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def destroy
only_intermission: attributes[:only_intermission],
only_signage: attributes[:only_signage],
only_subscreen: attributes[:only_subscreen],
order_index: attributes[:order_index]&.then { |v| v >= 0 ? v : VenueAnnouncement.order(order_index: :desc).first&.order_index&.succ } || 0,
order_index: attributes[:order_index]&.then(&:to_i)&.then { |v| v >= 0 ? v : VenueAnnouncement.order(order_index: :desc).first&.order_index&.succ } || 0,
}
end
end

0 comments on commit 1324304

Please sign in to comment.