Skip to content

Commit 60bd15a

Browse files
🐛 Fix potential conflicts
Co-authored-by: Motov Yurii <[email protected]>
1 parent c9f7ad8 commit 60bd15a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sqlmodel/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,9 @@ def Field(
391391
schema_extra: Optional[Dict[str, Any]] = None,
392392
json_schema_extra: Optional[Dict[str, Any]] = None,
393393
) -> Any:
394+
current_schema_extra = schema_extra or {}
394395
if json_schema_extra:
395-
current_schema_extra = {"json_schema_extra": json_schema_extra}
396-
else:
397-
current_schema_extra = schema_extra or {}
396+
current_schema_extra["json_schema_extra"] = json_schema_extra
398397
field_info = FieldInfo(
399398
default,
400399
default_factory=default_factory,

0 commit comments

Comments
 (0)