Skip to content

Commit

Permalink
_maybe_validate: bug fix for truncate when schema properties is blank
Browse files Browse the repository at this point in the history
  • Loading branch information
snarfed committed Aug 6, 2024
1 parent 47f46f3 commit 5412f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lexrpc/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def _maybe_validate(self, nsid, type, obj):
fail(f'{nsid} has no schema for {type}')

if self._truncate:
for name, config in schema.get('properties', []).items():
for name, config in schema.get('properties', {}).items():
# TODO: recurse into reference, union, etc properties
if max_graphemes := config.get('maxGraphemes'):
val = obj.get(name)
Expand Down

0 comments on commit 5412f9d

Please sign in to comment.