Merge branch 'main' into storefront-nuxt
This commit is contained in:
commit
f6e1e43665
1 changed files with 2 additions and 7 deletions
9
engine/core/vendors/__init__.py
vendored
9
engine/core/vendors/__init__.py
vendored
|
|
@ -397,7 +397,7 @@ class AbstractVendor:
|
||||||
f"No matching vendor found with name {self.vendor_name!r}..."
|
f"No matching vendor found with name {self.vendor_name!r}..."
|
||||||
) from dne
|
) from dne
|
||||||
|
|
||||||
def get_products(self) -> None:
|
def get_products(self) -> Any:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_products_queryset(self) -> QuerySet[Product]:
|
def get_products_queryset(self) -> QuerySet[Product]:
|
||||||
|
|
@ -523,13 +523,11 @@ class AbstractVendor:
|
||||||
|
|
||||||
value, attr_value_type = self.auto_convert_value(value)
|
value, attr_value_type = self.auto_convert_value(value)
|
||||||
|
|
||||||
is_created = False
|
|
||||||
|
|
||||||
if len(key) > 255:
|
if len(key) > 255:
|
||||||
key = key[:255]
|
key = key[:255]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
attribute, is_created = Attribute.objects.get_or_create(
|
attribute, _ = Attribute.objects.get_or_create(
|
||||||
name=key,
|
name=key,
|
||||||
group=attr_group,
|
group=attr_group,
|
||||||
value_type=attr_value_type,
|
value_type=attr_value_type,
|
||||||
|
|
@ -565,9 +563,6 @@ class AbstractVendor:
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not is_created:
|
|
||||||
return None
|
|
||||||
|
|
||||||
av, _ = AttributeValue.objects.get_or_create(
|
av, _ = AttributeValue.objects.get_or_create(
|
||||||
attribute=attribute,
|
attribute=attribute,
|
||||||
value=value,
|
value=value,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue