Skip to content

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

Update checkout last_change field

IKarbowiakd5e5e49dd830
diff --git a/saleor/checkout/migrations/0024_auto_20200120_0154.py b/saleor/checkout/migrations/0024_auto_20200120_0154.py
new file mode 100644
index 0000000000..2cbc743acf
--- /dev/null
+++ b/saleor/checkout/migrations/0024_auto_20200120_0154.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.9 on 2020-01-20 07:54
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("checkout", "0023_checkout_country"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="checkout",
+ name="last_change",
+ field=models.DateTimeField(auto_now=True),
+ ),
+ ]
diff --git a/saleor/checkout/models.py b/saleor/checkout/models.py
index 9b74d9a13c..4a88398085 100644
--- a/saleor/checkout/models.py
+++ b/saleor/checkout/models.py
@@ -53,7 +53,7 @@ class Checkout(ModelWithMetadata):
"""A shopping checkout."""
created = models.DateTimeField(auto_now_add=True)
- last_change = models.DateTimeField(auto_now_add=True)
+ last_change = models.DateTimeField(auto_now=True)
user = models.ForeignKey(
settings.AUTH_USER_MODEL,
blank=True,