Commits

NikolayBlohin committed 0859dde

Fix country error

Comments (0)

Files changed (1)

lfs/order/utils.py

         invoice_city = invoice_address.city,
         invoice_state = invoice_address.state,
         invoice_code = invoice_address.zip_code,
-        invoice_country = Country.objects.get(code=invoice_address.country.code),
+        invoice_country = Country.objects.filter(code=invoice_address.country.code)[0],
         invoice_phone = customer.selected_invoice_address.phone,
 
         shipping_firstname = shipping_address.firstname,
         shipping_city = shipping_address.city,
         shipping_state = shipping_address.state,
         shipping_code = shipping_address.zip_code,
-        shipping_country = Country.objects.get(code=shipping_address.country.code),
+        shipping_country = Country.objects.filter(code=shipping_address.country.code)[0],
         shipping_phone = shipping_address.phone,
 
         message = request.POST.get("message", ""),
     # removed from the session if the thank you page has been called.
     request.session["order"] = order
 
-    return order
+    return order