mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-21 23:58:02 +01:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
170edb2261
commit
e6a8ff9082
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
def forwards(apps, schema_editor):
|
def forwards(apps, schema_editor):
|
||||||
BasketItem = apps.get_model("purchase", "BasketItem") # noqa: N806
|
BasketItem = apps.get_model("purchase", "BasketItem")
|
||||||
items = (
|
items = (
|
||||||
BasketItem.objects.using(schema_editor.connection.alias)
|
BasketItem.objects.using(schema_editor.connection.alias)
|
||||||
.all()
|
.all()
|
||||||
|
|
|
@ -5,7 +5,7 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
def delete_baskets_without_payment_method(apps, schema_editor):
|
def delete_baskets_without_payment_method(apps, schema_editor):
|
||||||
Basket = apps.get_model("purchase", "Basket") # noqa: N806
|
Basket = apps.get_model("purchase", "Basket")
|
||||||
Basket.objects.using(schema_editor.connection.alias).filter(
|
Basket.objects.using(schema_editor.connection.alias).filter(
|
||||||
payment_method=None,
|
payment_method=None,
|
||||||
).delete()
|
).delete()
|
||||||
|
|
|
@ -5,7 +5,7 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
def create_default_categories(apps, schema_editor):
|
def create_default_categories(apps, schema_editor):
|
||||||
ProductCategory = apps.get_model("purchase", "ProductCategory") # noqa: N806
|
ProductCategory = apps.get_model("purchase", "ProductCategory")
|
||||||
ProductCategory.objects.using(schema_editor.connection.alias).create(
|
ProductCategory.objects.using(schema_editor.connection.alias).create(
|
||||||
name="default",
|
name="default",
|
||||||
color_hue=0,
|
color_hue=0,
|
||||||
|
|
Loading…
Reference in a new issue