Skip to content

Commit 9f0037f

Browse files
committed
Fix blank fields being always marked as nullable
1 parent 11e4abc commit 9f0037f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ninja/orm/factory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def create_schema(
6262

6363
definitions = {}
6464
for fld in model_fields_list:
65-
# types: ignore
6665
field_name, python_type, field_info = get_schema_field(
6766
fld,
6867
depth=depth,

ninja/orm/fields.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ def get_schema_field(
161161

162162
else:
163163
_f_name, _f_path, _f_pos, field_options = field.deconstruct()
164-
blank = field_options.get("blank", False)
165164
null = field_options.get("null", False)
166165
max_length = field_options.get("max_length")
167166

@@ -176,7 +175,7 @@ def get_schema_field(
176175
]
177176
raise ConfigError("\n".join(msg)) from e
178177

179-
if blank or null or optional:
178+
if null or optional:
180179
default = None
181180
nullable = True
182181

0 commit comments

Comments
 (0)