add NEVER_UNIT automation

This commit is contained in:
smilerz 2023-04-24 10:59:48 -05:00
parent 2f617aa40f
commit a7a6abe3d2
No known key found for this signature in database
GPG Key ID: 39444C7606D47126
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 4.1.7 on 2023-04-24 16:22 # Generated by Django 4.1.7 on 2023-04-24 15:00
from django.db import migrations, models from django.db import migrations, models
@ -13,7 +13,8 @@ class Migration(migrations.Migration):
migrations.AlterField( migrations.AlterField(
model_name='automation', model_name='automation',
name='type', name='type',
field=models.CharField(choices=[('FOOD_ALIAS', 'Food Alias'), ('UNIT_ALIAS', 'Unit Alias'), ('KEYWORD_ALIAS', 'Keyword Alias'), ('DESCRIPTION_REPLACE', 'Description Replace'), ('INSTRUCTION_REPLACE', 'Instruction Replace'), ('NEVER_UNIT', 'Never Unit'), ('TRANSPOSE_WORDS', 'Transpose Words')], max_length=128), field=models.CharField(choices=[('FOOD_ALIAS', 'Food Alias'), ('UNIT_ALIAS', 'Unit Alias'), ('KEYWORD_ALIAS', 'Keyword Alias'),
('DESCRIPTION_REPLACE', 'Description Replace'), ('INSTRUCTION_REPLACE', 'Instruction Replace'), ('NEVER_UNIT', 'Never Unit')], max_length=128),
), ),
migrations.AlterField( migrations.AlterField(
model_name='userpreference', model_name='userpreference',

View File

@ -770,7 +770,8 @@ class PropertyType(models.Model, PermissionModelMixin):
icon = models.CharField(max_length=16, blank=True, null=True) icon = models.CharField(max_length=16, blank=True, null=True)
order = models.IntegerField(default=0) order = models.IntegerField(default=0)
description = models.CharField(max_length=512, blank=True, null=True) description = models.CharField(max_length=512, blank=True, null=True)
category = models.CharField(max_length=64, choices=((NUTRITION, _('Nutrition')), (ALLERGEN, _('Allergen')), (PRICE, _('Price')), (GOAL, _('Goal')), (OTHER, _('Other'))), null=True, blank=True) category = models.CharField(max_length=64, choices=((NUTRITION, _('Nutrition')), (ALLERGEN, _('Allergen')),
(PRICE, _('Price')), (GOAL, _('Goal')), (OTHER, _('Other'))), null=True, blank=True)
open_data_slug = models.CharField(max_length=128, null=True, blank=True, default=None) open_data_slug = models.CharField(max_length=128, null=True, blank=True, default=None)
# TODO show if empty property? # TODO show if empty property?