Skip to content

Commit 9e57bc7

Browse files
committed
Django 4 compatability changes for, #123
1 parent 0206b77 commit 9e57bc7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: hordak/models/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Account(MPTTModel):
133133
# TODO: Implement this child_code_width field, as it is probably a good idea
134134
# child_code_width = models.PositiveSmallIntegerField(default=1)
135135
type = models.CharField(
136-
max_length=2, choices=AccountType, blank=True, verbose_name=_("type")
136+
max_length=2, choices=AccountType.choices, blank=True, verbose_name=_("type")
137137
)
138138
is_bank_account = models.BooleanField(
139139
default=False,

Diff for: hordak/models/db_views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class LegView(models.Model):
5858
max_length=2,
5959
help_text="Type of this transaction leg: debit or credit",
6060
verbose_name=_("type"),
61-
choices=LegType,
61+
choices=LegType.choices,
6262
)
6363
credit = models.DecimalField(
6464
max_digits=MAX_DIGITS,

Diff for: hordak/models/statement_csv_import.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TransactionCsvImport(models.Model):
3131
)
3232
state = models.CharField(
3333
max_length=20,
34-
choices=TransactionCsvImportState,
34+
choices=TransactionCsvImportState.choices,
3535
default="pending",
3636
verbose_name=_("state"),
3737
)
@@ -137,7 +137,7 @@ class TransactionCsvImportColumn(models.Model):
137137
blank=True,
138138
default=None,
139139
null=True,
140-
choices=ToField,
140+
choices=ToField.choices,
141141
verbose_name=_("Is"),
142142
)
143143
example = models.CharField(

0 commit comments

Comments
 (0)