Skip to content

Commit

Permalink
fixed icon issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Aug 30, 2023
1 parent 4ffc9cc commit 4a1ec5a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cookbook/helper/property_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def calculate_recipe_properties(self, recipe):
caches['default'].set(CacheHelper(self.space).PROPERTY_TYPE_CACHE_KEY, property_types, 60 * 60) # cache is cleared on property type save signal so long duration is fine

for fpt in property_types:
computed_properties[fpt.id] = {'id': fpt.id, 'name': fpt.name, 'icon': fpt.icon, 'description': fpt.description, 'unit': fpt.unit, 'order': fpt.order, 'food_values': {}, 'total_value': 0, 'missing_value': False}
computed_properties[fpt.id] = {'id': fpt.id, 'name': fpt.name, 'description': fpt.description, 'unit': fpt.unit, 'order': fpt.order, 'food_values': {}, 'total_value': 0, 'missing_value': False}

uch = UnitConversionHelper(self.space)

Expand Down
2 changes: 1 addition & 1 deletion cookbook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ class PropertyType(models.Model, PermissionModelMixin):
order = models.IntegerField(default=0)
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)
(PRICE, _('Price')), (GOAL, _('Goal')), (OTHER, _('Other'))), null=True, blank=True)
open_data_slug = models.CharField(max_length=128, null=True, blank=True, default=None)

# TODO show if empty property?
Expand Down
1 change: 0 additions & 1 deletion cookbook/tests/factories/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ class RecipeBookFactory(factory.django.DjangoModelFactory):
name = factory.LazyAttribute(lambda x: faker.sentence(
nb_words=3, variable_nb_words=False))
description = factory.LazyAttribute(lambda x: faker.sentence(nb_words=10))
icon = None
# shared = factory.SubFactory(UserFactory, space=factory.SelfAttribute('..space'))
created_by = factory.SubFactory(
UserFactory, space=factory.SelfAttribute('..space'))
Expand Down

0 comments on commit 4a1ec5a

Please sign in to comment.