Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix review remarks

oldPadavanac22f69f25e8
diff --git a/saleor/checkout/utils.py b/saleor/checkout/utils.py
index 4f6acbf10f..d1bc547e10 100644
--- a/saleor/checkout/utils.py
+++ b/saleor/checkout/utils.py
@@ -829,7 +829,7 @@ def _fill_order_with_cart_data(order, cart, discounts, taxes):
if cart.note:
order.customer_note = cart.note
- order.save()
+ order.save(update_fields=['customer_note'])
@transaction.atomic
diff --git a/saleor/order/migrations/0051_order_customer_note.py b/saleor/order/migrations/0050_auto_20180803_0337.py
similarity index 59%
rename from saleor/order/migrations/0051_order_customer_note.py
rename to saleor/order/migrations/0050_auto_20180803_0337.py
index c90d536942..d274960b5f 100644
--- a/saleor/order/migrations/0051_order_customer_note.py
+++ b/saleor/order/migrations/0050_auto_20180803_0337.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.0.3 on 2018-07-31 14:05
+# Generated by Django 2.0.3 on 2018-08-03 08:37
from django.db import migrations, models
@@ -6,10 +6,14 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ('order', '0050_remove_ordernote_is_public'),
+ ('order', '0049_auto_20180719_0520'),
]
operations = [
+ migrations.RemoveField(
+ model_name='ordernote',
+ name='is_public',
+ ),
migrations.AddField(
model_name='order',
name='customer_note',
diff --git a/saleor/order/migrations/0050_remove_ordernote_is_public.py b/saleor/order/migrations/0050_remove_ordernote_is_public.py
deleted file mode 100644
index 8776952052..0000000000
--- a/saleor/order/migrations/0050_remove_ordernote_is_public.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# Generated by Django 2.0.3 on 2018-07-24 12:16
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('order', '0049_auto_20180719_0520'),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name='ordernote',
- name='is_public',
- ),
- ]
diff --git a/tests/test_order.py b/tests/test_order.py
index 46f9775076..b255ff008c 100644
--- a/tests/test_order.py
+++ b/tests/test_order.py
@@ -435,7 +435,7 @@ def test_create_user_after_order(order, client):
assert user.orders.filter(token=order.token).exists()
-def test_view_order_detals(order, client):
+def test_view_order_details(order, client):
url = reverse('order:details', kwargs={'token': order.token})
response = client.get(url)
assert response.status_code == 200