From 190377a10801e1a4111d8f87760b92f8385fbba0 Mon Sep 17 00:00:00 2001 From: Erikas Date: Sun, 7 Jul 2024 13:13:23 +0300 Subject: [PATCH] description of the benchmark can be empty --- benchmarks.go | 4 ++-- templates/benchmark_create.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks.go b/benchmarks.go index 99102e7..e371329 100644 --- a/benchmarks.go +++ b/benchmarks.go @@ -135,13 +135,13 @@ func postBenchmarkCreate(c *gin.Context) { } description := strings.TrimSpace(c.PostForm("description")) - if len(description) > 500 || description == "" { + if len(description) > 500 { c.HTML(http.StatusUnauthorized, "error.tmpl", gin.H{ "activePage": "error", "username": session.Get("Username"), "userID": session.Get("ID"), - "errorMessage": "Description must not be empty or exceed 500 characters", + "errorMessage": "Description must not exceed 500 characters", }) return } diff --git a/templates/benchmark_create.tmpl b/templates/benchmark_create.tmpl index a584679..cf5a726 100644 --- a/templates/benchmark_create.tmpl +++ b/templates/benchmark_create.tmpl @@ -11,7 +11,7 @@
- +