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 =
tags
|> Enum.filter(&String.starts_with?(&1, "-"))
|> Enum.map(&String.slice(&1, 1..-1))
|> Enum.map(&String.replace_leading(&1, "-", ""))
added_tags =
Tag