You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I had a bug in my app using the API because the route returning the drinks https://impactco2.fr/api/v1/thematiques/ecv/3?detail=0&language=fr is returning two items with the slug set to laitdevache, one with an ecv of 0.1505 and one with an ecv of 1.33. This is crashing my app as I use slugs as the unique ID.
I indeed find this laitdevache being defined twice in your data, once in boisson.json and once in alimentation.json, but I would have expect the drink route to not include the item from the alimentation.json (although I see there that it has the category set to 3, so I guess that's why it is included in this route).
In any case, I think it would be better to have the slug unique in the whole app, so I would suggest to remove the definition of laitdevache in the alimentation.json file. I initially did that in an MR but then I realized it is loaded in alimentation.ts so I guess it's better if you do it.
Thanks for your work!
The text was updated successfully, but these errors were encountered:
Hello,
I had a bug in my app using the API because the route returning the drinks
https://impactco2.fr/api/v1/thematiques/ecv/3?detail=0&language=fr
is returning two items with the slug set tolaitdevache
, one with an ecv of 0.1505 and one with an ecv of 1.33. This is crashing my app as I use slugs as the unique ID.I indeed find this
laitdevache
being defined twice in your data, once in boisson.json and once in alimentation.json, but I would have expect thedrink
route to not include the item from thealimentation.json
(although I see there that it has the category set to 3, so I guess that's why it is included in this route).In any case, I think it would be better to have the slug unique in the whole app, so I would suggest to remove the definition of
laitdevache
in thealimentation.json
file. I initially did that in an MR but then I realized it is loaded inalimentation.ts
so I guess it's better if you do it.Thanks for your work!
The text was updated successfully, but these errors were encountered: