You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe what you are trying to achieve:
in FilterSchema, is it possible to use the params 'exclude_none' ?
Please include code examples (like models code, schemes code, view function) to help understand the issue
class Filters(FilterSchema):
limit: int = 100
offset: int = None
query: str = None
category__in: List[str] = Field(None, alias="categories")
@route.get("/filter")
def events(request, filters: Query[Filters]):
print(filters.filter)
return {"filters": filters.dict()}
the print output is
<FilterSchema.filter of Filters(limit=100, offset=None, query=None, category__in=None)>
while the filters.dict does't have the none value , the filters.filter is still have the none value.
And my question is there any possible to use 'exclude_none' in request body?
The text was updated successfully, but these errors were encountered:
Please describe what you are trying to achieve:
in FilterSchema, is it possible to use the params 'exclude_none' ?
Please include code examples (like models code, schemes code, view function) to help understand the issue
the print output is
while the filters.dict does't have the none value , the filters.filter is still have the none value.
And my question is there any possible to use 'exclude_none' in request body?
The text was updated successfully, but these errors were encountered: