From 1ba1d2c867175c239b57128c0c7a83fd3dc5bb55 Mon Sep 17 00:00:00 2001
From: Julian Leucker <leuckerj@gmail.com>
Date: Wed, 19 Oct 2022 14:51:34 +0200
Subject: [PATCH] Allow empty label and help text

---
 django_forms_as_jsonschema/jsonschema.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/django_forms_as_jsonschema/jsonschema.py b/django_forms_as_jsonschema/jsonschema.py
index d24fd3c..5aa2abf 100644
--- a/django_forms_as_jsonschema/jsonschema.py
+++ b/django_forms_as_jsonschema/jsonschema.py
@@ -69,8 +69,8 @@ class JSONSchema:
     def add_field(self, name, field):
         new_field = {
             "type": "string",
-            "title": str(field.label),
-            "description": str(field.help_text),
+            "title": str(field.label or ""),
+            "description": str(field.help_text or ""),
             "readOnly": field.disabled
         }
 
-- 
GitLab