django-shop-simplevariations
django-shop-simplevariations copied to clipboard
Use with PostgreSQL throws Integrity Error
When I tried migrating a working setup from sqlite3 to PostgreSQL, I hit the following error:
IntegrityError at /cart/ insert or update on table "shop_simplevariations_cartitemoption" violates foreign key constraint "cartitem_id_refs_id_16df55fa"
DETAIL: Key (cartitem_id)=(60) is not present in table "shop_cartitem".
Exception Value:
insert or update on table "shop_simplevariations_cartitemoption" violates foreign key constraint "cartitem_id_refs_id_16df55fa"
DETAIL: Key (cartitem_id)=(60) is not present in table "shop_cartitem".
It is though it trying to modify the cart item before the item becomes a CartItem.
Removing the OptionGroup from the shop product allowed adding the item successfully to the cart. Unfortunately, With only one price option.