Skip to content

Commit

Permalink
Don't apply tags when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
milesmcc committed Nov 4, 2024
1 parent 532b18b commit f3c195e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion platform/lib/platform/material.ex
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ defmodule Platform.Material do
with false <- Enum.member?([:owner, :manager], user_project_membership.role),
new_tags_json <- System.get_env("AUTOTAG_USER_INCIDENTS"),
false <- is_nil(new_tags_json) or String.trim(new_tags_json) == "",
{:ok, new_tags} <- Jason.decode(new_tags_json) do
{:ok, new_tags} <- Jason.decode(new_tags_json)
false <- Enum.empty?(new_tags) do
{:ok, new_media} =
update_media_attribute_audited(
media,
Expand Down

0 comments on commit f3c195e

Please sign in to comment.