Skip to content

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

Add default order for payment

jxltombb6e35e86442
diff --git a/saleor/payment/migrations/0004_auto_20181206_0031.py b/saleor/payment/migrations/0004_auto_20181206_0031.py
new file mode 100644
index 0000000000..d0a1088f18
--- /dev/null
+++ b/saleor/payment/migrations/0004_auto_20181206_0031.py
@@ -0,0 +1,17 @@
+# Generated by Django 2.1.3 on 2018-12-06 06:31
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('payment', '0003_rename_payment_method_to_payment'),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name='payment',
+ options={'ordering': ['pk']},
+ ),
+ ]
diff --git a/saleor/payment/models.py b/saleor/payment/models.py
index 10eea91a55..1849fd2802 100644
--- a/saleor/payment/models.py
+++ b/saleor/payment/models.py
@@ -83,6 +83,9 @@ class Payment(models.Model):
cc_exp_year = models.PositiveIntegerField(
validators=[MinValueValidator(1000)], null=True, blank=True)
+ class Meta:
+ ordering = ['pk']
+
def __repr__(self):
return 'Payment(gateway=%s, is_active=%s, created=%s, charge_status=%s)' % (
self.gateway, self.is_active, self.created, self.charge_status)