Fix invalid backwards range usage with String.slice

This commit is contained in:
Liam 2024-06-02 00:02:37 -04:00
parent 6bde65abd1
commit 7667aec145

View file

@ -17,7 +17,7 @@ defmodule PhilomenaWeb.Admin.Batch.TagController do
removed_tag_names = removed_tag_names =
tags tags
|> Enum.filter(&String.starts_with?(&1, "-")) |> Enum.filter(&String.starts_with?(&1, "-"))
|> Enum.map(&String.slice(&1, 1..-1)) |> Enum.map(&String.replace_leading(&1, "-", ""))
added_tags = added_tags =
Tag Tag