From a054fb2ad915059875c0554f7373b1e496d6525e Mon Sep 17 00:00:00 2001 From: qloridant Date: Sun, 1 Dec 2024 19:45:40 +0100 Subject: [PATCH] Dans substance, remplacer new_name par name --- api/serializers/declaration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/serializers/declaration.py b/api/serializers/declaration.py index fe2f691e..ae8bb6ff 100644 --- a/api/serializers/declaration.py +++ b/api/serializers/declaration.py @@ -386,11 +386,11 @@ def get_declared_ingredients(self, obj): def get_declared_substances(self, obj): return [ { - "nom": declared_substance.new_name, + "nom": declared_substance.name, "quantité_par_djr": declared_substance.quantity, "unite": declared_substance.unit.name, } - if declared_substance.new_name and declared_substance.quantity and declared_substance.unit + if declared_substance.name and declared_substance.quantity and declared_substance.unit else {} for declared_substance in obj.declared_substances.all() ]