add label to reusablemedium

This commit is contained in:
Richard Schreiber
2025-12-01 12:06:59 +01:00
committed by Martin Gross
parent dd247c47f8
commit ab49d09c18
3 changed files with 12 additions and 0 deletions

View File

@@ -152,6 +152,8 @@ class ReusableMediaSerializer(I18nAwareModelSerializer):
'updated',
'type',
'identifier',
'secret',
'label',
'active',
'expires',
'customer',

View File

@@ -15,6 +15,11 @@ class Migration(migrations.Migration):
name="secret",
field=models.CharField(max_length=200, null=True),
),
migrations.AddField(
model_name="reusablemedium",
name="label",
field=models.CharField(max_length=200, null=True),
),
# use temporary related_name "linked_mediums" for ManyToManyField, so we can migrate existing data
migrations.AddField(
model_name="reusablemedium",

View File

@@ -77,6 +77,11 @@ class ReusableMedium(LoggedModel):
verbose_name=pgettext_lazy('reusable_medium', 'Secret'),
null=True, blank=True
)
label = models.CharField(
max_length=200,
verbose_name=pgettext_lazy('reusable_medium', 'Label'),
null=True, blank=True
)
active = models.BooleanField(
verbose_name=_('Active'),