You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where as all other commands use:
product, created = Product.objects.get_or_create(title=row[TITLE])
base_cat, created = Category.objects.get_or_create(title=row[CATEGORY])
sub_cat, created = Category.objects.get_or_create(
shop_cat, created = Category.objects.get_or_create(title="Shop")
image, created = ProductImage.objects.get_or_create(
new_option, created = ProductOption.objects.get_or_create(
Changing variation to objects.get_or_create causes some other indexing errors.
Any Special reason why variation alone uses "objects.create" whereas the others use "objects.get_or_create".
The text was updated successfully, but these errors were encountered:
Product_db command issue: Possible duplication due to just "objects.create" rather than "objects.get_or_create":
variation = ProductVariation.objects.create(
# strip whitespace
sku=row[SKU].replace(" ", ""),
product=product,
)
Where as all other commands use:
product, created = Product.objects.get_or_create(title=row[TITLE])
base_cat, created = Category.objects.get_or_create(title=row[CATEGORY])
sub_cat, created = Category.objects.get_or_create(
shop_cat, created = Category.objects.get_or_create(title="Shop")
image, created = ProductImage.objects.get_or_create(
new_option, created = ProductOption.objects.get_or_create(
Changing variation to objects.get_or_create causes some other indexing errors.
Any Special reason why variation alone uses "objects.create" whereas the others use "objects.get_or_create".
The text was updated successfully, but these errors were encountered: