Fix uicon field type

This commit is contained in:
Edgar P. Burkhart 2023-04-19 10:08:41 +02:00
parent 629c993072
commit 93b31dabee
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 24 additions and 4 deletions

View file

@ -0,0 +1,22 @@
# Generated by Django 4.1.4 on 2023-04-19 08:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("main", "0025_alter_account_options_alter_invoice_options_and_more"),
]
operations = [
migrations.AlterField(
model_name="account",
name="uicon",
field=models.CharField(default="🏦", max_length=1, verbose_name="Icon"),
),
migrations.AlterField(
model_name="category",
name="uicon",
field=models.CharField(default="📂", max_length=1, verbose_name="Icon"),
),
]

View file

@ -43,10 +43,9 @@ def get_path(instance, filename):
class Account(CustomModel):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=64, default=_("Account"), verbose_name=_("Name"))
uicon = models.SlugField(
uicon = models.CharField(
max_length=1,
default="🏦",
allow_unicode=True,
verbose_name=_("Icon"),
)
default = models.BooleanField(default=False, verbose_name=_("Default"))
@ -97,10 +96,9 @@ class Category(CustomModel):
name = models.CharField(
max_length=64, default=_("Category"), verbose_name=_("Name")
)
uicon = models.SlugField(
uicon = models.CharField(
max_length=1,
default="📂",
allow_unicode=True,
verbose_name=_("Icon"),
)
budget = models.BooleanField(default=True, verbose_name=_("Budget"))