-
Hi, I have some problem when I first time to using this amazing fast REST framework. I have a schema to using the alias Field for get an Item. class ItemSerializer(Schema):
category: str = Field(None, alias="category_schema.category.name")
invoice_date: str = Field(None, alias="form.invoice_date")
description: str = Field(None, alias="form.description")
amount: int = Field(None, alias="form.amount") But when I put schema into ItemList. It's crash. class ItemListSerializer(Schema):
item_list = List[ItemSerializer] = [] TypeError: '_GenericAlias' object does not support item assignment Does any way to resolve this problem? |
Beta Was this translation helpful? Give feedback.
Answered by
becory
Jul 2, 2022
Replies: 1 comment
-
oops, my fault...... typing error. item_list: List[ItemSerializer] = [] |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
becory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oops, my fault...... typing error.