It is also possible to add a FDC ID directly to the food. This cannot be done via the UI but has to be done via the admin view.
As this might be a bit annoying the way with setting the URL of a food to get the FDC ID should still be possible.
However foods imported from the Tandoor Open Data project already have an ID set so it would be a shame not to use those and having to add a URL despite the ID already being there.
The goal is to use the FDC ID field, if it is present and use the URL only as a fallback.
When a FDC ID is set in the field and a URL is present the program should suppose that the user wanted to overwrite the given ID and the URL field should be used.
TL;DR
FDC ID present in the FDC ID field and no URL is set => use FDC ID from FDC ID field
FDC ID present in the FDC ID field and URL is set => use URL
FDC ID not present in the FDC ID field and URL is set => use URL
FDC ID not present in the FDC ID field an no URL is set => Do not update anything
It is also possible to add a FDC ID directly to the food. This cannot be done via the UI but has to be done via the admin view. As this might be a bit annoying the way with setting the URL of a food to get the FDC ID should still be possible.
However foods imported from the Tandoor Open Data project already have an ID set so it would be a shame not to use those and having to add a URL despite the ID already being there.
The goal is to use the FDC ID field, if it is present and use the URL only as a fallback. When a FDC ID is set in the field and a URL is present the program should suppose that the user wanted to overwrite the given ID and the URL field should be used.
TL;DR