finish fields docs intial ver,add test for related name, fix child_name(s) in reverse relations
This commit is contained in:
@ -35,12 +35,12 @@ class BaseField:
|
||||
@property
|
||||
def is_required(self) -> bool:
|
||||
return (
|
||||
not self.nullable and not self.has_default and not self.is_auto_primary_key
|
||||
not self.nullable and not self.has_default and not self.is_auto_primary_key
|
||||
)
|
||||
|
||||
@property
|
||||
def default_value(self) -> Any:
|
||||
default = self.default if self.default is not None else self.server_default
|
||||
default = self.default
|
||||
return default() if callable(default) else default
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user