Skip to content

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

Changes after code review

Damian Wysockibcbf5c3dd41b
diff --git a/saleor/account/migrations/0043_merge_20200423_0653.py b/saleor/account/migrations/0043_merge_20200423_0653.py
deleted file mode 100644
index 6b06184fac..0000000000
--- a/saleor/account/migrations/0043_merge_20200423_0653.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Generated by Django 3.0.5 on 2020-04-23 11:53
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("account", "0040_auto_20200423_0425"),
- ("account", "0042_merge_20200422_0555"),
- ]
-
- operations = []
diff --git a/saleor/account/migrations/0040_auto_20200423_0425.py b/saleor/account/migrations/0045_auto_20200427_0425.py
similarity index 86%
rename from saleor/account/migrations/0040_auto_20200423_0425.py
rename to saleor/account/migrations/0045_auto_20200427_0425.py
index e4eb63d6f1..6294b5822c 100644
--- a/saleor/account/migrations/0040_auto_20200423_0425.py
+++ b/saleor/account/migrations/0045_auto_20200427_0425.py
@@ -1,5 +1,4 @@
-# Generated by Django 3.0.5 on 2020-04-23 09:25
-
+# Generated by Django 3.0.5 on 2020-04-27 09:25
from copy import deepcopy
from django.db import migrations
@@ -11,7 +10,7 @@ def create_payments_customer_ids():
plugins = get_plugins_manager().plugins
return {
- f"{plugin.PLUGIN_NAME.strip().upper()}.customer_id": f"{plugin.PLUGIN_ID.strip().upper()}.customer_id"
+ f"{plugin.PLUGIN_NAME.strip().upper()}.customer_id": f"{plugin.PLUGIN_ID.strip().upper()}.customer_id" # noqa E501
for plugin in plugins
}
@@ -33,7 +32,7 @@ def convert_user_payments_customer_id(apps, schema_editor):
class Migration(migrations.Migration):
dependencies = [
- ("account", "0039_auto_20200221_0257"),
+ ("account", "0044_unmount_app_and_app_token"),
("plugins", "0002_auto_20200417_0335"),
]
diff --git a/saleor/account/migrations/0045_merge_20200423_0705.py b/saleor/account/migrations/0045_merge_20200423_0705.py
deleted file mode 100644
index a90be10e6f..0000000000
--- a/saleor/account/migrations/0045_merge_20200423_0705.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# Generated by Django 3.0.5 on 2020-04-23 12:05
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("account", "0043_merge_20200423_0653"),
- ("account", "0044_unmount_app_and_app_token"),
- ]
-
- operations = []
diff --git a/saleor/payment/gateways/braintree/plugin.py b/saleor/payment/gateways/braintree/plugin.py
index 0031ba1dce..9487061f68 100644
--- a/saleor/payment/gateways/braintree/plugin.py
+++ b/saleor/payment/gateways/braintree/plugin.py
@@ -32,7 +32,7 @@ def require_active_plugin(fn):
class BraintreeGatewayPlugin(BasePlugin):
- PLUGIN_ID = "mirumee.gateway.braintree"
+ PLUGIN_ID = "mirumee.payments.braintree"
PLUGIN_NAME = GATEWAY_NAME
DEFAULT_CONFIGURATION = [
{"name": "Public API key", "value": None},
diff --git a/saleor/payment/gateways/dummy/plugin.py b/saleor/payment/gateways/dummy/plugin.py
index 301a29377e..b08db07883 100644
--- a/saleor/payment/gateways/dummy/plugin.py
+++ b/saleor/payment/gateways/dummy/plugin.py
@@ -30,7 +30,7 @@ def require_active_plugin(fn):
class DummyGatewayPlugin(BasePlugin):
- PLUGIN_ID = "mirumee.gateway.dummy"
+ PLUGIN_ID = "mirumee.payments.dummy"
PLUGIN_NAME = GATEWAY_NAME
DEFAULT_ACTIVE = True
DEFAULT_CONFIGURATION = [
diff --git a/saleor/payment/gateways/razorpay/plugin.py b/saleor/payment/gateways/razorpay/plugin.py
index 748dd9d114..1f883fcdc3 100644
--- a/saleor/payment/gateways/razorpay/plugin.py
+++ b/saleor/payment/gateways/razorpay/plugin.py
@@ -22,7 +22,7 @@ def require_active_plugin(fn):
class RazorpayGatewayPlugin(BasePlugin):
PLUGIN_NAME = GATEWAY_NAME
- PLUGIN_ID = "mirumee.gateway.razorpay"
+ PLUGIN_ID = "mirumee.payments.razorpay"
DEFAULT_CONFIGURATION = [
{"name": "Public API key", "value": None},
{"name": "Secret API key", "value": None},
diff --git a/saleor/payment/gateways/stripe/plugin.py b/saleor/payment/gateways/stripe/plugin.py
index 66127726bd..43852e1e8f 100644
--- a/saleor/payment/gateways/stripe/plugin.py
+++ b/saleor/payment/gateways/stripe/plugin.py
@@ -32,7 +32,7 @@ def require_active_plugin(fn):
class StripeGatewayPlugin(BasePlugin):
PLUGIN_NAME = GATEWAY_NAME
- PLUGIN_ID = "mirumee.gateway.stripe"
+ PLUGIN_ID = "mirumee.payments.stripe"
DEFAULT_CONFIGURATION = [
{"name": "Public API key", "value": None},
{"name": "Secret API key", "value": None},
diff --git a/saleor/plugins/anonymize/plugin.py b/saleor/plugins/anonymize/plugin.py
index 461c5e4b84..5acbe1067d 100644
--- a/saleor/plugins/anonymize/plugin.py
+++ b/saleor/plugins/anonymize/plugin.py
@@ -12,7 +12,7 @@ class AnonymizePlugin(BasePlugin):
"""Anonymize all user data in the checkout, user profile and its orders."""
PLUGIN_NAME = "Anonymize"
- PLUGIN_ID = "mirumee.anonymize"
+ PLUGIN_ID = "mirumee.taxes.anonymize"
DEFAULT_ACTIVE = True
PLUGIN_DESCRIPTION = (
"Anonymize customer's personal data in the checkout, such as shipping "
diff --git a/saleor/plugins/avatax/plugin.py b/saleor/plugins/avatax/plugin.py
index 3bfcec3468..805d3a96ac 100644
--- a/saleor/plugins/avatax/plugin.py
+++ b/saleor/plugins/avatax/plugin.py
@@ -41,7 +41,7 @@ logger = logging.getLogger(__name__)
class AvataxPlugin(BasePlugin):
PLUGIN_NAME = "Avalara"
- PLUGIN_ID = "mirumee.avalara"
+ PLUGIN_ID = "mirumee.taxes.avalara"
DEFAULT_CONFIGURATION = [
{"name": "Username or account", "value": None},
diff --git a/saleor/plugins/vatlayer/plugin.py b/saleor/plugins/vatlayer/plugin.py
index cb561cfd87..368841588d 100644
--- a/saleor/plugins/vatlayer/plugin.py
+++ b/saleor/plugins/vatlayer/plugin.py
@@ -30,7 +30,7 @@ if TYPE_CHECKING:
class VatlayerPlugin(BasePlugin):
- PLUGIN_ID = "mirumee.vatlayer"
+ PLUGIN_ID = "mirumee.taxes.vatlayer"
PLUGIN_NAME = "Vatlayer"
META_CODE_KEY = "vatlayer.code"
META_DESCRIPTION_KEY = "vatlayer.description"