Skip to content

Commit

Permalink
fix: transaction countries should be optional
Browse files Browse the repository at this point in the history
The `Transaction` countries on the Admin shouldn't be required.

Relates to #280
  • Loading branch information
igobranco committed Mar 12, 2024
1 parent 9dd5298 commit b6239e2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.8 on 2024-03-12 11:02

import django_countries.fields
from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("billing", "0004_alter_transactionitem_description_and_more"),
]

operations = [
migrations.AlterField(
model_name="transaction",
name="vat_identification_country",
field=django_countries.fields.CountryField(blank=True, max_length=255, null=True),
),
]
4 changes: 2 additions & 2 deletions apps/billing/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class Transaction(BaseModel):
city = models.CharField(max_length=100, null=True, blank=True)
postal_code = models.CharField(max_length=50, null=True, blank=True)
state = models.CharField(max_length=50, null=True, blank=True)
country_code = CountryField(max_length=255, null=True)
country_code = CountryField(max_length=255, null=True, blank=True)
vat_identification_number = models.CharField(max_length=20, null=True, blank=True)
vat_identification_country = CountryField(max_length=255, null=True)
vat_identification_country = CountryField(max_length=255, null=True, blank=True)
total_amount_exclude_vat = models.DecimalField(max_digits=10, decimal_places=2)
total_amount_include_vat = models.DecimalField(max_digits=10, decimal_places=2)
currency = models.CharField(max_length=7, default="EUR")
Expand Down

0 comments on commit b6239e2

Please sign in to comment.