Closed jknndy closed 8 months ago
Can you try to code it with а const called RECIPE_YIELD_TYPES
for example?
Something like:
RECIPE_YIELD_TYPES = (
"dozen",
"batch",
"cake",
"sandwich",
"buns",
# ..etc
)
that follow up devs can easily extend
Changed over to using the constant list as recommended, the change seems to be working as intended as a few test cases required updates.
Me like it.. a lot :)
Adds functionality to the get_yields function to handle cases where the "serving" metric is dozen (#960) or batches.
This may be an unwanted functionality in which case we can just close this without merge but wanted to take a shot at addressing the bug report but if this is something that could be beneficial going forward it could be expanded to handle piece(s), jar(s), cup(s), slice(s), etc...
Resolves #960