diff --git a/ninja/orm/fields.py b/ninja/orm/fields.py index d67814c8c..e260ac0ec 100644 --- a/ninja/orm/fields.py +++ b/ninja/orm/fields.py @@ -148,7 +148,6 @@ def get_schema_field( else: _f_name, _f_path, _f_pos, field_options = field.deconstruct() - blank = field_options.get("blank", False) null = field_options.get("null", False) max_length = field_options.get("max_length") @@ -163,7 +162,7 @@ def get_schema_field( ] raise ConfigError("\n".join(msg)) from e - if field.primary_key or blank or null or optional: + if field.primary_key or null or optional: default = None nullable = True