From 82ec446c87dfc33a74b95df44155e39bcf09b462 Mon Sep 17 00:00:00 2001 From: Mark Pittaway Date: Tue, 4 Jun 2024 10:01:10 +1000 Subject: [PATCH] fix schema maxlength error when value is None --- apps/validate/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/validate/validate.py b/apps/validate/validate.py index dfd2c2f36c..bcf5f67f4f 100644 --- a/apps/validate/validate.py +++ b/apps/validate/validate.py @@ -303,7 +303,7 @@ def _validate_media_metadata(self, validate, associations_field, associations): self._error("media's " + field, REQUIRED_FIELD) try: max_length = int(schema["maxlength"]) - except KeyError: + except (KeyError, TypeError): pass except ValueError: logger.error("Invalid max length value for media field {field}".format(field=field))