After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777621 - Don't show dairy warning for vegan recipes
Don't show dairy warning for vegan recipes
Status: RESOLVED FIXED
Product: recipes
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Recipes maintainer(s)
Recipes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-01-22 20:17 UTC by Matthew Leeds
Modified: 2017-01-24 16:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't show dairy warning for vegan recipes (1.04 KB, patch)
2017-01-22 20:17 UTC, Matthew Leeds
committed Details | Review

Description Matthew Leeds 2017-01-22 20:17:36 UTC
This might not be a good long-term solution but it works
Comment 1 Matthew Leeds 2017-01-22 20:17:38 UTC
Created attachment 344001 [details] [review]
Don't show dairy warning for vegan recipes

Vegan recipes by definition can't contain dairy so we shouldn't show a
warning for it even if the milk-free flag isn't set. Another solution
would be to set the milk-free flag for all vegan recipes, but the code
seems to make the assumption that each recipe has only one diet flag
set.
Comment 2 Matthias Clasen 2017-01-23 15:09:14 UTC
I don't think we should have an assumption like that (only one diet). Where do you see that ?
Comment 3 Matthew Leeds 2017-01-23 23:17:57 UTC
(In reply to Matthias Clasen from comment #2)
> I don't think we should have an assumption like that (only one diet). Where
> do you see that ?

I thought that was the case based on the switch statement in gr_diet_get_label and elsewhere, but I suppose it's just supposed to return a label for any of the flags that are set rather than all of them.
Comment 4 Matthias Clasen 2017-01-24 08:38:45 UTC
Yes, that's correct. I'm not super happy with the way the flags have worked out for this, and may replace them with something else at some point
Comment 5 Matthias Clasen 2017-01-24 16:22:13 UTC
Attachment 344001 [details] pushed as 53c528a - Don't show dairy warning for vegan recipes