From 76de321d4155fb7b2e3104cdb5c51c119f73dc0f Mon Sep 17 00:00:00 2001 From: trotFunky Date: Thu, 1 Aug 2024 22:49:41 +0100 Subject: [PATCH] templates: Don't show the tagging form if no tags If there are no tags but the form is still shown, the admin could ask to add an empty tag returning an error 422 unprocessable entity. Remove if there are no tags available --- Cargo.lock | 2 +- Cargo.toml | 2 +- templates/weeks/editable_truth.tera | 26 ++++++++++++++------------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58f9b72..b3eece5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -578,7 +578,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fabula_votes_server" -version = "1.4.0" +version = "1.4.1" dependencies = [ "argon2", "blake2", diff --git a/Cargo.toml b/Cargo.toml index ec70a8c..298d596 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "fabula_votes_server" license = "MPL-2.0" readme = "README.md" authors = ["trotFunky"] -version = "1.4.0" +version = "1.4.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/templates/weeks/editable_truth.tera b/templates/weeks/editable_truth.tera index f546128..8d75882 100644 --- a/templates/weeks/editable_truth.tera +++ b/templates/weeks/editable_truth.tera @@ -15,16 +15,18 @@
{% include "weeks/truth_editor" %}
-
- - -
+ {% if tags | length > 0 and tags | length > truth.tags | length %} +
+ + +
+ {% endif %}