Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix issue with meal item
Roland Geiderb8d6229cb7f6
diff --git a/nutrition/models.py b/nutrition/models.pyindex 267299065..5d5a5768d 100644--- a/nutrition/models.py+++ b/nutrition/models.py@@ -200,7 +200,7 @@ class MealItem(models.Model):def __unicode__(self):"""Return a more human-readable representation"""- return "%s %s %s" % (self.order, self.amount_gramm or self.amount_freetext, self.ingredient)+ return "%sg ingredient %s" % (self.amount_gramm, self.ingredient_id)def get_owner_object(self):"""diff --git a/nutrition/templates/edit_meal_item.html b/nutrition/templates/edit_meal_item.htmlindex d9c0d6855..4f9777ab6 100644--- a/nutrition/templates/edit_meal_item.html+++ b/nutrition/templates/edit_meal_item.html@@ -1,7 +1,7 @@{% extends "base.html" %}{% load i18n %}{% load staticfiles %}-{% load manager_extras %}+{% load manager_extras %}{% block title %}{% trans "Edit meal item" %}{% endblock %}@@ -33,11 +33,12 @@ $(document).ready(function() {{% if js_active %}<input type="hidden" id="id_ingredient" name="ingredient" value="{{ingredient}}">{% else %}- {% yaml_form_field form.amount_gramm form.ingredient "ym-fbox-select"%}+ {% yaml_form_field form.amount_gramm %}+ {% yaml_form_field form.ingredient %}{% endif %}<tr><td style="text-align:right;">- {% trans "Ingredient name" %}+ {% trans "Ingredient name" %}</td><td><div class="ym-fbox-text">