From 92ab3db88b48ae7384c4aac460287ead2cf9cc9e Mon Sep 17 00:00:00 2001 From: Quentin Guillemin Date: Thu, 14 Mar 2024 11:35:14 +0100 Subject: [PATCH] fix: title can not be empty string --- .../java/fr/recia/collabsoft/model/pojo/JsonFileBody.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fr/recia/collabsoft/model/pojo/JsonFileBody.java b/src/main/java/fr/recia/collabsoft/model/pojo/JsonFileBody.java index dcbc373b..d85dd11b 100644 --- a/src/main/java/fr/recia/collabsoft/model/pojo/JsonFileBody.java +++ b/src/main/java/fr/recia/collabsoft/model/pojo/JsonFileBody.java @@ -27,11 +27,11 @@ public class JsonFileBody { private Boolean pub; public boolean postDataOk() { - return (title != null && blob != null && associatedAppId != null && pub != null); + return (title != null && !title.trim().isEmpty() && blob != null && associatedAppId != null && pub != null); } public boolean putDataOk() { - return (title != null || description != null || blob != null || pub != null); + return ((title != null && !title.trim().isEmpty()) || description != null || blob != null || pub != null); } }