Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename appType to correct names
Maciej Korycinski4265f0d1f3bb
diff --git a/saleor/app/installation_utils.py b/saleor/app/installation_utils.pyindex 9f9c488c72..15b2d23899 100644--- a/saleor/app/installation_utils.py+++ b/saleor/app/installation_utils.py@@ -50,7 +50,7 @@ def install_app(configuration_url=manifest_data.get("configurationUrl"),app_url=manifest_data.get("appUrl"),version=manifest_data.get("version"),- type=AppType.EXTERNAL,+ type=AppType.THIRDPARTY,)app.permissions.set(app_installation.permissions.all())token = app.tokens.create(name="Default token")diff --git a/saleor/app/migrations/0003_auto_20200610_0400.py b/saleor/app/migrations/0003_auto_20200610_0400.pynew file mode 100644index 0000000000..0826e4412c--- /dev/null+++ b/saleor/app/migrations/0003_auto_20200610_0400.py@@ -0,0 +1,22 @@+# Generated by Django 3.0.6 on 2020-06-10 09:00++from django.db import migrations, models+++class Migration(migrations.Migration):++ dependencies = [+ ("app", "0002_auto_20200520_0124"),+ ]++ operations = [+ migrations.AlterField(+ model_name="app",+ name="type",+ field=models.CharField(+ choices=[("local", "local"), ("thirdparty", "thirdparty")],+ default="local",+ max_length=60,+ ),+ ),+ ]diff --git a/saleor/app/models.py b/saleor/app/models.pyindex 6e8a7721f5..ca2d3ec3f6 100644--- a/saleor/app/models.py+++ b/saleor/app/models.py@@ -14,7 +14,7 @@ class App(ModelWithMetadata):created = models.DateTimeField(auto_now_add=True)is_active = models.BooleanField(default=True)type = models.CharField(- choices=AppType.CHOICES, default=AppType.CUSTOM, max_length=60+ choices=AppType.CHOICES, default=AppType.LOCAL, max_length=60)identifier = models.CharField(blank=True, null=True, max_length=256)permissions = models.ManyToManyField(diff --git a/saleor/app/types.py b/saleor/app/types.pyindex 7458767f3a..732ba7af3f 100644--- a/saleor/app/types.py+++ b/saleor/app/types.py@@ -1,5 +1,5 @@class AppType:- CUSTOM = "custom"- EXTERNAL = "external"+ LOCAL = "local"+ THIRDPARTY = "thirdparty"- CHOICES = [(CUSTOM, "custom"), (EXTERNAL, "EXTERNAL")]+ CHOICES = [(LOCAL, "local"), (THIRDPARTY, "thirdparty")]diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 4ad0f4c2a7..67ebb3dab3 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -359,8 +359,8 @@ input AppTokenInput {}enum AppTypeEnum {- CUSTOM- EXTERNAL+ LOCAL+ THIRDPARTY}type AppUpdate {diff --git a/tests/conftest.py b/tests/conftest.pyindex 1167540ec2..c151cbfdbe 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -1979,7 +1979,7 @@ def external_app(db):app = App.objects.create(name="External App",is_active=True,- type=AppType.EXTERNAL,+ type=AppType.THIRDPARTY,identifier="mirumee.app.sample",about_app="About app text.",data_privacy="Data privacy text.",