@@ -1528,7 +1528,9 @@ class Product(JsonModel, index=True):
15281528 name : str = Field (index = True , sortable = True ) # TAG field with sortable
15291529 category : str = Field (index = True , sortable = True ) # TAG field with sortable
15301530 price : int = Field (index = True , sortable = True ) # NUMERIC field with sortable
1531- tags : List [str ] = Field (index = True , sortable = True ) # TAG field (list) with sortable
1531+ tags : List [str ] = Field (
1532+ index = True , sortable = True
1533+ ) # TAG field (list) with sortable
15321534
15331535 class Meta :
15341536 global_key_prefix = key_prefix
@@ -1543,9 +1545,13 @@ class Meta:
15431545 await Migrator ().run ()
15441546
15451547 # Create test data
1546- product1 = Product (name = "Zebra" , category = "Animals" , price = 100 , tags = ["wild" , "africa" ])
1548+ product1 = Product (
1549+ name = "Zebra" , category = "Animals" , price = 100 , tags = ["wild" , "africa" ]
1550+ )
15471551 product2 = Product (name = "Apple" , category = "Fruits" , price = 50 , tags = ["red" , "sweet" ])
1548- product3 = Product (name = "Banana" , category = "Fruits" , price = 30 , tags = ["yellow" , "sweet" ])
1552+ product3 = Product (
1553+ name = "Banana" , category = "Fruits" , price = 30 , tags = ["yellow" , "sweet" ]
1554+ )
15491555
15501556 await product1 .save ()
15511557 await product2 .save ()
0 commit comments