File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 99from typing import Optional , Any , Iterable
1010
1111from ._api import get_server_api_connection
12+ from .exceptions import UnsupportedServerVersion
1213from .utils import create_entity_id , REMOVED_VALUE , NOT_SET
1314
1415if typing .TYPE_CHECKING :
@@ -1267,6 +1268,14 @@ def create_product(
12671268 "folderId" : folder_id ,
12681269 }
12691270
1271+ if (
1272+ product_base_type
1273+ and not self ._con .is_product_base_type_supported ()
1274+ ):
1275+ raise UnsupportedServerVersion (
1276+ "Product base type is not supported for your server version."
1277+ )
1278+
12701279 for key , value in (
12711280 ("attrib" , attrib ),
12721281 ("data" , data ),
@@ -1321,6 +1330,14 @@ def update_product(
13211330 UpdateOperation: Object of update operation.
13221331
13231332 """
1333+ if (
1334+ product_base_type
1335+ and not self ._con .is_product_base_type_supported ()
1336+ ):
1337+ raise UnsupportedServerVersion (
1338+ "Product base type is not supported for your server version."
1339+ )
1340+
13241341 update_data = {
13251342 key : value
13261343 for key , value in (
You can’t perform that action at this time.
0 commit comments