Skip to content

Commit

Permalink
Dans substance, remplacer new_name par name
Browse files Browse the repository at this point in the history
  • Loading branch information
qloridant committed Dec 1, 2024
1 parent 49fe562 commit a054fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/serializers/declaration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
]
Expand Down

0 comments on commit a054fb2

Please sign in to comment.