Skip to content

Commit

Permalink
field required
Browse files Browse the repository at this point in the history
  • Loading branch information
honglei committed Aug 16, 2023
1 parent 72dc89d commit fa8955c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sqlmodel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,7 @@ def _is_field_noneable(field: FieldInfo) -> bool:
return field.nullable
if not field.is_required():
default = getattr(field, "original_default", field.default)
if default is None:
return True
elif default is PydanticUndefined:
if default is PydanticUndefined:
return False
if field.annotation is None or field.annotation is NoneType:
return True
Expand Down

0 comments on commit fa8955c

Please sign in to comment.