Skip to content

Commit

Permalink
fix schema maxlength error when value is None
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Jun 4, 2024
1 parent 237674d commit 82ec446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/validate/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 82ec446

Please sign in to comment.