Skip to content

Commit 08b6bd8

Browse files
committed
feat ⭐ make structure and title optional
1 parent 2131d0e commit 08b6bd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

oscar_odin/resources/catalogue.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class CategoryResource(OscarCatalogueResource):
7070
depth: Optional[int]
7171
path: Optional[str]
7272
children: Optional[List["CategoryResource"]] = odin.ListOf.delayed(
73-
lambda: CategoryResource
73+
lambda: CategoryResource, null=True
7474
)
7575

7676

@@ -102,8 +102,8 @@ class ProductResource(OscarCatalogueResource):
102102
id: Optional[int]
103103
code: Optional[str]
104104
upc: Optional[str]
105-
structure: str = StringField(choices=ProductModel.STRUCTURE_CHOICES)
106-
title: str
105+
structure: Optional[str] = StringField(choices=ProductModel.STRUCTURE_CHOICES)
106+
title: Optional[str]
107107
slug: Optional[str]
108108
description: Optional[str] = ""
109109
meta_title: Optional[str]

0 commit comments

Comments
 (0)