Merge branch 'master' into m2m_fields
This commit is contained in:
@ -68,7 +68,7 @@ class UndefinedType: # pragma no cover
|
||||
|
||||
Undefined = UndefinedType()
|
||||
|
||||
__version__ = "0.9.4"
|
||||
__version__ = "0.9.5"
|
||||
__all__ = [
|
||||
"Integer",
|
||||
"BigInteger",
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import inspect
|
||||
from typing import Any, List, Optional, TYPE_CHECKING, Type, Union
|
||||
|
||||
import sqlalchemy
|
||||
|
||||
@ -73,7 +73,9 @@ def create_dummy_model(
|
||||
"".join(choices(string.ascii_uppercase, k=2)) + uuid.uuid4().hex[:4]
|
||||
).lower()
|
||||
fields = {f"{pk_field.name}": (pk_field.__type__, None)}
|
||||
|
||||
dummy_model = create_model( # type: ignore
|
||||
|
||||
f"PkOnly{base_model.get_name(lower=False)}{alias}",
|
||||
__module__=base_model.__module__,
|
||||
**fields, # type: ignore
|
||||
|
||||
@ -98,7 +98,7 @@ def populate_pydantic_default_values(attrs: Dict) -> Tuple[Dict, Dict]:
|
||||
BaseField class.
|
||||
|
||||
Trigger conversion of ormar field into pydantic FieldInfo, which has all needed
|
||||
paramaters saved.
|
||||
parameters saved.
|
||||
|
||||
Overwrites the annotations of ormar fields to corresponding types declared on
|
||||
ormar fields (constructed dynamically for relations).
|
||||
|
||||
Reference in New Issue
Block a user