Skip to content

Commit 85cc9cd

Browse files
committed
Fix migration
1 parent e030dbb commit 85cc9cd

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

backend/billing/migrations/0002_billingaddress_user_first_name_and_more.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 5.1.4 on 2025-03-11 22:28
1+
# Generated by Django 5.1.4 on 2025-03-11 22:35
22

33
from django.db import migrations, models
44

@@ -22,4 +22,9 @@ class Migration(migrations.Migration):
2222
field=models.TextField(default='', verbose_name='user last name'),
2323
preserve_default=False,
2424
),
25+
migrations.AlterField(
26+
model_name='billingaddress',
27+
name='user_name',
28+
field=models.TextField(blank=True, default='', verbose_name='user name'),
29+
),
2530
]

backend/billing/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BillingAddress(TimeStampedModel):
2424
is_business = models.BooleanField(_("is business"))
2525
company_name = models.TextField(_("company name"), blank=True)
2626
# TODO: delete this in future
27-
user_name = models.TextField(_("user name"))
27+
user_name = models.TextField(_("user name"), default="", blank=True)
2828
user_first_name = models.TextField(_("user first name"))
2929
user_last_name = models.TextField(_("user last name"))
3030
zip_code = models.TextField(_("zip code"))

backend/pretix/tests/test_create_order.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ def test_creates_order_with_additional_info_for_e_invoice(requests_mock):
346346
invoice_information=InvoiceInformation(
347347
is_business=False,
348348
company="ABC",
349-
name="ABC",
349+
first_name="Patrick",
350+
last_name="Arminio",
350351
street="ABC",
351352
zipcode="ABC",
352353
city="ABC",
@@ -416,7 +417,8 @@ def test_creates_order_with_additional_info_for_e_invoice_does_not_break_on_erro
416417
invoice_information=InvoiceInformation(
417418
is_business=False,
418419
company="ABC",
419-
name="ABC",
420+
first_name="Patrick",
421+
last_name="Arminio",
420422
street="ABC",
421423
zipcode="ABC",
422424
city="ABC",

0 commit comments

Comments
 (0)