Saleor: Cannot place order in saleor demo's storefront

Created on 23 Jun 2018  路  5Comments  路  Source: mirumee/saleor

What I'm trying to achieve

Place an order on the demo store to reproduce another bug. :wink:

Steps to reproduce the problem

  1. Create a cart with an item;
  2. Follow the checkout until the summary page;
  3. Try to hit "Order & Pay";
  4. A server error should occur.

System information

Host: demo.getsaleor.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept-Language: en,en-GB;q=0.8,en-US
Accept-Encoding: gzip, deflate, br
Referer: https://demo.getsaleor.com/en/checkout/summary/
bug

All 5 comments

It has been fixed now.

It's back.

There is a problem with address anonymization. The error being thrown is:

MultipleObjectsReturned
get() returned more than one Address -- it returned 2!

and it happens in store_user_address function in this line:

address, _ = user.addresses.get_or_create(**address.as_data())

Apparently, multiple similar addresses in the database became the same after anonymization. Therefore Django cannot distinguish between them. For now, I've cleared and recreated the database. Quick fix around that would be to use filter instead of get.

Looks like the address is being duplicated during the address creation as when deleting the duplicate one from account details, the checkout doesn't crash anymore.

I will take a look if I have 5 minutes later today.

Should be fixed now. I'll deploy the new version of demo within next few days.

Was this page helpful?
0 / 5 - 0 ratings