Projekt_Si/classes/data/logic_test.py

19 lines
486 B
Python
Raw Normal View History

def diet_restriction(meals,client):
2024-04-11 15:44:45 +02:00
flag = True
print(client.restrykcje_dietowe)
for meal in meals:
vegan,vegetarian,meat = meal.vegan_vegetarian_meat
print(meal)
2024-04-11 15:44:45 +02:00
if not vegan and client.restrykcje_dietowe == 'Vegan':
print("tu")
flag = False
elif client.restrykcje_dietowe == 'Vegetarian' and meat:
print("tu2")
flag = False
print("----------------------------------")
return flag