mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-19 14:17:59 +01:00
count safe tag correctly in set intersection
This commit is contained in:
parent
a97f8d23ad
commit
42d03ef548
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ defmodule Philomena.Images.TagValidator do
|
|||
|
||||
defp validate_safe(changeset, %{safe: s, sexual: x, horror: h, gross: g}) do
|
||||
cond do
|
||||
MapSet.size(s) > 1 and (MapSet.size(x) > 0 or MapSet.size(h) > 0 or MapSet.size(g) > 0) ->
|
||||
MapSet.size(s) > 0 and (MapSet.size(x) > 0 or MapSet.size(h) > 0 or MapSet.size(g) > 0) ->
|
||||
add_error(changeset, :tag_input, "may not contain any other rating if safe")
|
||||
|
||||
true ->
|
||||
|
|
Loading…
Reference in a new issue