cartridge icon indicating copy to clipboard operation
cartridge copied to clipboard

Fix ProductVariation creation when SHOP_USE_VARIATIONS=False

Open yomguy opened this issue 7 years ago • 1 comments

This fix a bug saving a Product with SHOP_USE_VARIATIONS=False

DoesNotExist at /admin/shop/product/add/
ProductVariation matching query does not exist.
Request Method:	POST
Request URL:	http://localhost:9020/admin/shop/product/add/
Django Version:	1.9.11
Exception Type:	DoesNotExist
Exception Value:	
ProductVariation matching query does not exist.
Exception Location:	/usr/local/lib/python3.5/site-packages/django/db/models/query.py in get, line 387
Python Executable:	/usr/local/bin/python
Python Version:	3.5.2
Python Path:	
['/srv/app',
 '/srv/lib/grappelli-safe',
 '/srv/lib/mezzanine',
 '/srv/lib/mezzanine-agenda',
 '/srv/lib/django-eve',
 '/srv/lib/django-prestashop',
 '/srv/lib/cartridge',
 '/usr/local/lib/python35.zip',
 '/usr/local/lib/python3.5',
 '/usr/local/lib/python3.5/plat-linux',
 '/usr/local/lib/python3.5/lib-dynload',
 '/usr/local/lib/python3.5/site-packages']

yomguy avatar Nov 25 '16 17:11 yomguy

It seems like it isn't supposed to be possible to have a Product with no variation when USE_PRODUCT_VARIATIONS=False. How does that happen?

ryneeverett avatar Nov 27 '16 01:11 ryneeverett