Skip to content

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

make order note work with anon users

Jon Lawrence4e594ed8d4fc
diff --git a/saleor/checkout/core.py b/saleor/checkout/core.py
index fec3b96e94..6029eb4b1e 100644
--- a/saleor/checkout/core.py
+++ b/saleor/checkout/core.py
@@ -342,7 +342,7 @@ class Checkout:
increase_voucher_usage(voucher)
if self.note is not None:
- order.notes.create(user=self.user or None, content=self.note)
+ order.notes.create(user=order.user, content=self.note)
return order
diff --git a/saleor/order/migrations/0030_merge_20180103_2219.py b/saleor/order/migrations/0030_merge_20180103_2219.py
new file mode 100644
index 0000000000..a8bda497c6
--- /dev/null
+++ b/saleor/order/migrations/0030_merge_20180103_2219.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.5 on 2018-01-03 22:19
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('order', '0027_auto_20180103_1443'),
+ ('order', '0029_auto_20171228_1752'),
+ ]
+
+ operations = [
+ ]