Skip to content

Commit 249afab

Browse files
committed
Null values for not-required strings are treated as empty strings
Fixes #187
1 parent e485ef1 commit 249afab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

django_jsonform/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def validate_string(self, schema, data, coords, raise_exc=False):
298298
if isinstance(data, str):
299299
trimmed_data = data.strip()
300300
else:
301-
trimmed_data = data
301+
trimmed_data = data or ""
302302

303303
is_empty = not trimmed_data
304304

0 commit comments

Comments
 (0)